From: Erik Moeller Date: Sat, 21 May 2005 17:41:30 +0000 (+0000) Subject: move default parameter to the right per recommendations X-Git-Tag: 1.5.0alpha2~132 X-Git-Url: https://git.cyclocoop.org/%7B%7B%20url_for%28?a=commitdiff_plain;h=4358f0ef72536cfd2bef7ff412c7c09225417da1;p=lhc%2Fweb%2Fwiklou.git move default parameter to the right per recommendations on http://www.php.net/manual/en/functions.arguments.php --- diff --git a/includes/Article.php b/includes/Article.php index 328cd6d48d..2262be271d 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1208,12 +1208,11 @@ class Article { # Parse the text and replace links with placeholders $wgOut = new OutputPage(); - # Pass the current title along (use linestart default) - # in case we're creating a wiki page which is different - # than the currently displayed one (e.g. image pages - # craeted on file uploads); otherwise, link updates will + # Pass the current title along in case we're creating a wiki page + # which is different than the currently displayed one (e.g. image + # pages created on file uploads); otherwise, link updates will # go wrong. - $wgOut->addWikiTextWithTitle( $text, true, $this->mTitle ); + $wgOut->addWikiTextWithTitle( $text, $this->mTitle ); # Look up the links in the DB and add them to the link cache $wgOut->transformBuffer( RLH_FOR_UPDATE ); diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 28f3b3972b..f756693bbc 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -232,20 +232,19 @@ class OutputPage { */ function addWikiText( $text, $linestart = true ) { global $wgTitle; - $this->addWikiTextTitle($text, $linestart, $wgTitle); + $this->addWikiTextTitle($text, $wgTitle, $linestart); } - function addWikiTextWithTitle($text, $linestart = true, &$title) { - $this->addWikiTextTitle($text, $linestart, $title); + function addWikiTextWithTitle($text, &$title, $linestart = true) { + $this->addWikiTextTitle($text, $title, $linestart); } - function addWikiTextTitle($text, $linestart, &$title) { + function addWikiTextTitle($text, &$title, $linestart) { global $wgParser, $wgUseTidy; $parserOutput = $wgParser->parse( $text, $title, $this->mParserOptions, $linestart ); $this->mLanguageLinks += $parserOutput->getLanguageLinks(); $this->mCategoryLinks += $parserOutput->getCategoryLinks(); $this->addHTML( $parserOutput->getText() ); - } /**