Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F7534
b29110.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Authored By
•
bzimport
Nov 21 2014, 11:27 PM
2014-11-21 23:27:33 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
b29110.patch
View Options
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
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
7064
Default Alt Text
b29110.patch (1 KB)
Attached To
Mode
T31110: $wgFeedDiffCutoff doesn't affect new pages
Attached
Detach File
Event Timeline
Log In to Comment