move default parameter to the right per recommendations
authorErik Moeller <erik@users.mediawiki.org>
Sat, 21 May 2005 17:41:30 +0000 (17:41 +0000)
committerErik Moeller <erik@users.mediawiki.org>
Sat, 21 May 2005 17:41:30 +0000 (17:41 +0000)
on http://www.php.net/manual/en/functions.arguments.php

includes/Article.php
includes/OutputPage.php

index 328cd6d..2262be2 100644 (file)
@@ -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 );
index 28f3b39..f756693 100644 (file)
@@ -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() );
-       
        }       
                
        /**