From d9944c772a0a73d3f9fc6db8c7964ef1128ed547 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Mon, 27 Jul 2009 19:42:24 +0000 Subject: [PATCH] * (bug 17988) Spaces before [[Category:]] links are no longer ignored * some code style fixes --- RELEASE-NOTES | 1 + includes/parser/Parser.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 160b81ce34..4f5fd47b93 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 2ff208360a..aaf848fec1 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -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; -- 2.20.1