}
public static function checkFeedOutput( $type ) {
- global $wgFeed, $wgOut, $wgFeedClasses;
+ global $wgFeed, $wgFeedClasses;
if ( !$wgFeed ) {
global $wgOut;
if( $oldid ) {
wfProfileIn( __FUNCTION__."-dodiff" );
- $de = new DifferenceEngine( $title, $oldid, $newid );
#$diffText = $de->getDiff( wfMsg( 'revisionasof',
- # $wgContLang->timeanddate( $timestamp ) ),
+ # $wgContLang->timeanddate( $timestamp ),
+ # $wgContLang->date( $timestamp ),
+ # $wgContLang->time( $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 ),
+ $wgContLang->date( $timestamp ),
+ $wgContLang->time( $timestamp ) ) );
+ }
- if ( strlen( $diffText ) > $wgFeedDiffCutoff ) {
+ if ( ( strlen( $diffText ) > $wgFeedDiffCutoff ) || ( $wgFeedDiffCutoff <= 0 ) ) {
// Omit large diffs
$diffLink = $title->escapeFullUrl(
'diff=' . $newid .
return $text;
}
-}
\ No newline at end of file
+}