From: Brian Wolff Date: Fri, 7 Jan 2011 00:17:52 +0000 (+0000) Subject: Comment in code says - truncate to 250 bytes, then add ellipse. but X-Git-Tag: 1.31.0-rc.0~32729 X-Git-Url: http://git.cyclocoop.org/data/%24self?a=commitdiff_plain;h=767da0cb6125d36fef5d2c30e5e73812f3f1c622;p=lhc%2Fweb%2Fwiklou.git Comment in code says - truncate to 250 bytes, then add ellipse. but 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 --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 93b61e908d..fb6bcaf24a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 diff --git a/includes/EditPage.php b/includes/EditPage.php index f1b599899f..30e01e752c 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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);