* (bug 17988) Spaces before [[Category:]] links are no longer ignored
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 27 Jul 2009 19:42:24 +0000 (19:42 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Mon, 27 Jul 2009 19:42:24 +0000 (19:42 +0000)
* some code style fixes

RELEASE-NOTES
includes/parser/Parser.php

index 160b81c..4f5fd47 100644 (file)
@@ -340,6 +340,7 @@ this. Was used when mwEmbed was going to be an extension.
   database with username/password in MediaWiki's setup
 * (bugs 18407, 18409) Special:Upload is now listed on Special:Specialpages only
   if uploads are enabled and the user can access it
+* (bug 17988) Spaces before [[Category:]] links are no longer ignored
 
 == API changes in 1.16 ==
 
index 2ff2083..aaf848f 100644 (file)
@@ -1705,7 +1705,7 @@ class Parser
 
                                if ( $ns == NS_CATEGORY ) {
                                        wfProfileIn( __METHOD__."-category" );
-                                       $s = rtrim($s . "\n"); # bug 87
+                                       $s = rtrim( $s, "\n" ); # bug 87
 
                                        if ( $wasblank ) {
                                                $sortkey = $this->getDefaultSort();
@@ -1721,7 +1721,7 @@ class Parser
                                         * Strip the whitespace Category links produce, see bug 87
                                         * @todo We might want to use trim($tmp, "\n") here.
                                         */
-                                       $s .= trim($prefix . $trail, "\n") == '' ? '': $prefix . $trail;
+                                       $s .= trim( $prefix . $trail, "\n" ) == '' ? '' : $prefix . $trail;
 
                                        wfProfileOut( __METHOD__."-category" );
                                        continue;