(bug 14868) Setting $wgFeedDiffCutoff to 0 now stops generation of the diff entirely, not just display of it. No point in wasting time doing the former if you don't want the latter :)
This commit is contained in:
parent
3b651bc529
commit
1a0017a76f
2 changed files with 12 additions and 7 deletions
|
|
@ -82,6 +82,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
|
|||
* (bug 12370) Add throttle on password attempts. Defaults to max 5 attempts in 5 minutes.
|
||||
* (bug 15016) 'Templates used on this page' list in view source should be wrapped
|
||||
in a div with class "templatesUsed"
|
||||
* (bug 14868) Setting $wgFeedDiffCutoff to 0 now disables generation of the diff
|
||||
entirely, not just the display of it.
|
||||
|
||||
=== API changes in 1.14 ===
|
||||
|
||||
|
|
|
|||
|
|
@ -75,17 +75,20 @@ class FeedUtils {
|
|||
if( $oldid ) {
|
||||
wfProfileIn( __FUNCTION__."-dodiff" );
|
||||
|
||||
$de = new DifferenceEngine( $title, $oldid, $newid );
|
||||
#$diffText = $de->getDiff( wfMsg( 'revisionasof',
|
||||
# $wgContLang->timeanddate( $timestamp ) ),
|
||||
# wfMsg( 'currentrev' ) );
|
||||
$diffText = $de->getDiff(
|
||||
wfMsg( 'previousrevision' ), // hack
|
||||
wfMsg( 'revisionasof',
|
||||
$wgContLang->timeanddate( $timestamp ) ) );
|
||||
|
||||
// Don't bother generating the diff if we won't be able to show it
|
||||
if ( $wgFeedDiffCutoff > 0 ) {
|
||||
$de = new DifferenceEngine( $title, $oldid, $newid );
|
||||
$diffText = $de->getDiff(
|
||||
wfMsg( 'previousrevision' ), // hack
|
||||
wfMsg( 'revisionasof',
|
||||
$wgContLang->timeanddate( $timestamp ) ) );
|
||||
}
|
||||
|
||||
|
||||
if ( strlen( $diffText ) > $wgFeedDiffCutoff ) {
|
||||
if ( ( strlen( $diffText ) > $wgFeedDiffCutoff ) || ( $wgFeedDiffCutoff <= 0 ) ) {
|
||||
// Omit large diffs
|
||||
$diffLink = $title->escapeFullUrl(
|
||||
'diff=' . $newid .
|
||||
|
|
|
|||
Loading…
Reference in a new issue