diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2009-02-22 13:37:51 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2009-02-22 13:37:51 +0100 |
commit | b9b85843572bf283f48285001e276ba7e61b63f6 (patch) | |
tree | 4c6f4571552ada9ccfb4030481dcf77308f8b254 /includes/FeedUtils.php | |
parent | d9a20acc4e789cca747ad360d87ee3f3e7aa58c1 (diff) |
updated to MediaWiki 1.14.0
Diffstat (limited to 'includes/FeedUtils.php')
-rw-r--r-- | includes/FeedUtils.php | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/includes/FeedUtils.php b/includes/FeedUtils.php index aa784c02..38bff363 100644 --- a/includes/FeedUtils.php +++ b/includes/FeedUtils.php @@ -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 . |