Page MenuHomePhabricator

b29110.patch

Authored By
• bzimport
Nov 21 2014, 11:27 PM
Size
1 KB
Referenced Files
None
Subscribers
None

b29110.patch

Index: includes/FeedUtils.php
===================================================================
--- includes/FeedUtils.php (revision 91246)
+++ includes/FeedUtils.php (revision )
@@ -145,14 +145,25 @@
wfProfileOut( __METHOD__."-dodiff" );
} else {
$rev = Revision::newFromId( $newid );
- if( is_null( $rev ) ) {
+ if( $wgFeedDiffCutoff <= 0 || is_null( $rev ) ) {
$newtext = '';
} else {
$newtext = $rev->getText();
}
+
+ if ( $wgFeedDiffCutoff <= 0 || strlen( $newtext ) > $wgFeedDiffCutoff ) {
+ // Omit large new page diffs, bug 29110
+ $diffLink = $title->escapeFullUrl( 'diff=' . $newid );
+ $diffText = '<a href="' .
+ $diffLink .
+ '">' .
+ htmlspecialchars( wfMsgForContent( 'showdiff' ) ) .
+ '</a>';
+ } else {
- $diffText = '<p><b>' . wfMsg( 'newpage' ) . '</b></p>' .
- '<div>' . nl2br( htmlspecialchars( $newtext ) ) . '</div>';
- }
+ $diffText = '<p><b>' . wfMsg( 'newpage' ) . '</b></p>' .
+ '<div>' . nl2br( htmlspecialchars( $newtext ) ) . '</div>';
+ }
+ }
$completeText .= $diffText;
}

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
7064
Default Alt Text
b29110.patch (1 KB)

Event Timeline