* (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 ===
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 .