From: Ævar Arnfjörð Bjarmason Date: Wed, 13 Apr 2005 08:26:08 +0000 (+0000) Subject: * (bug 87) finishing it off.. X-Git-Tag: 1.5.0alpha1~280 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=e5aa994d2eb36e0d0b5d63290e419df3a2cdf5cd;p=lhc%2Fweb%2Fwiklou.git * (bug 87) finishing it off.. * tell formatNum that it's processing a year. --- diff --git a/includes/Parser.php b/includes/Parser.php index 0cbcad6526..d5217b80bd 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1256,7 +1256,7 @@ class Parser if( $iw && $this->mOptions->getInterwikiMagic() && $nottalk && $wgContLang->getLanguageName( $iw ) ) { array_push( $this->mOutput->mLanguageLinks, $nt->getFullText() ); $tmp = $prefix . $trail ; - $s .= (trim($tmp) == '')? '': $tmp; + $s .= (trim($tmp) == '') ? '': $tmp; continue; } @@ -1283,6 +1283,7 @@ class Parser if ( $ns == NS_CATEGORY ) { wfProfileIn( "$fname-category" ); $t = $nt->getText(); + $s = rtrim($s . "\n"); # bug 87 $wgLinkCache->suspend(); # Don't save in links/brokenlinks $pPLC=$sk->postParseLinkColour(); @@ -1307,8 +1308,7 @@ class Parser * Strip the whitespace Category links produce, see bug 87 * @todo We might want to use trim($tmp, "\n") here. */ - $tmp = $prefix . $trail; - $s .= trim($tmp) == '' ? '': $tmp; + $s .= trim($prefix . $trail, "\n") == '' ? '': $prefix . $trail; wfProfileOut( "$fname-category" ); continue; @@ -1734,7 +1734,7 @@ class Parser case MAG_CURRENTDAYNAME: return $varCache[$index] = $wgContLang->getWeekdayName( date('w')+1 ); case MAG_CURRENTYEAR: - return $varCache[$index] = $wgContLang->formatNum( date( 'Y' ) ); + return $varCache[$index] = $wgContLang->formatNum( date( 'Y' ), true ); case MAG_CURRENTTIME: return $varCache[$index] = $wgContLang->time( wfTimestampNow(), false ); case MAG_CURRENTWEEK: