Comment in code says - truncate to 250 bytes, then add ellipse. but
authorBrian Wolff <bawolff@users.mediawiki.org>
Fri, 7 Jan 2011 00:17:52 +0000 (00:17 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Fri, 7 Jan 2011 00:17:52 +0000 (00:17 +0000)
we don't add the ellipse, so change it to add the ellipse. The
comment and code should be the same, and since we have the room
might as well add the ellipse.

This normally wouldn't affect much, since users with JS on
will be prevented from adding that long a summary on the
client side

RELEASE-NOTES
includes/EditPage.php

index 93b61e9..fb6bcaf 100644 (file)
@@ -61,6 +61,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 26574) Added 'upload' to $wgRestrictionTypes, allowing upload protected 
   pages to be queried via the API and Special:ProtectedPages, and allowing 
   disabling upload protection by removing it from $wgRestrictionTypes.
+* If an edit summary exceeds 250 bytes and is truncated, add an ellipse
 
 === API changes in 1.18 ===
 * (bug 26339) Throw warning when truncating an overlarge API result
index f1b5998..30e01e7 100644 (file)
@@ -557,7 +557,7 @@ class EditPage {
                        }
 
                        # Truncate for whole multibyte characters. +5 bytes for ellipsis
-                       $this->summary = $wgLang->truncate( $request->getText( 'wpSummary' ), 250, '' );
+                       $this->summary = $wgLang->truncate( $request->getText( 'wpSummary' ), 250 );
 
                        # Remove extra headings from summaries and new sections.
                        $this->summary = preg_replace('/^\s*=+\s*(.*?)\s*=+\s*$/', '$1', $this->summary);