From 4358f0ef72536cfd2bef7ff412c7c09225417da1 Mon Sep 17 00:00:00 2001 From: Erik Moeller Date: Sat, 21 May 2005 17:41:30 +0000 Subject: [PATCH] move default parameter to the right per recommendations on http://www.php.net/manual/en/functions.arguments.php --- includes/Article.php | 9 ++++----- includes/OutputPage.php | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) 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() ); - } /** -- 2.20.1