Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3574
autoSummChars.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 9:32 PM
2014-11-21 21:32:36 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
autoSummChars.patch
View Options
Index: Article.php
===================================================================
--- Article.php (revision 19917)
+++ Article.php (working copy)
@@ -2832,12 +2832,17 @@
#New page autosummaries
if ($flags & EDIT_NEW && strlen($newtext)) {
#If they're making a new article, give its text, truncated, in the summary.
- global $wgContLang;
- $truncatedtext = $wgContLang->truncate(
- str_replace("\n", ' ', $newtext),
- max( 0, 200 - strlen( wfMsgForContent( 'autosumm-new') ) ),
- '...' );
- $summary = wfMsgForContent( 'autosumm-new', $truncatedtext );
+ global $wgAutoSummChars;
+ if ($wgAutoSummChars > 0) {
+ global $wgContLang;
+ $truncatedtext = $wgContLang->truncate(
+ str_replace("\n", ' ', $newtext),
+ max( 0, $wgAutoSummChars - strlen( wfMsgForContent( 'autosumm-new') ) ),
+ '...' );
+ $summary = wfMsgForContent( 'autosumm-new', $truncatedtext );
+ } else {
+ $summary = "";
+ }
}
if ($summary)
Index: DefaultSettings.php
===================================================================
--- DefaultSettings.php (revision 19917)
+++ DefaultSettings.php (working copy)
@@ -2457,4 +2457,10 @@
*/
$wgEnableCascadingProtection = true;
+/**
+ * Set this to "0" to disable auto-summaries.
+ * Otherwise, specify the max. number of characters for auto-summaries.
+ */
+$wgAutoSummChars = 200;
+
?>
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3141
Default Alt Text
autoSummChars.patch (1 KB)
Attached To
Mode
T10968: Configuration variable to truncate or disable automatic edit summaries
Attached
Detach File
Event Timeline
Log In to Comment