r9125 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r9124‎ | r9125 | r9126 >
Date:17:41, 21 May 2005
Author:eloquence
Status:old
Tags:
Comment:
move default parameter to the right per recommendations
on http://www.php.net/manual/en/functions.arguments.php
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/OutputPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -1208,12 +1208,11 @@
12091209 # Parse the text and replace links with placeholders
12101210 $wgOut = new OutputPage();
12111211
1212 - # Pass the current title along (use linestart default)
1213 - # in case we're creating a wiki page which is different
1214 - # than the currently displayed one (e.g. image pages
1215 - # craeted on file uploads); otherwise, link updates will
 1212+ # Pass the current title along in case we're creating a wiki page
 1213+ # which is different than the currently displayed one (e.g. image
 1214+ # pages created on file uploads); otherwise, link updates will
12161215 # go wrong.
1217 - $wgOut->addWikiTextWithTitle( $text, true, $this->mTitle );
 1216+ $wgOut->addWikiTextWithTitle( $text, $this->mTitle );
12181217
12191218 # Look up the links in the DB and add them to the link cache
12201219 $wgOut->transformBuffer( RLH_FOR_UPDATE );
Index: trunk/phase3/includes/OutputPage.php
@@ -232,20 +232,19 @@
233233 */
234234 function addWikiText( $text, $linestart = true ) {
235235 global $wgTitle;
236 - $this->addWikiTextTitle($text, $linestart, $wgTitle);
 236+ $this->addWikiTextTitle($text, $wgTitle, $linestart);
237237 }
238238
239 - function addWikiTextWithTitle($text, $linestart = true, &$title) {
240 - $this->addWikiTextTitle($text, $linestart, $title);
 239+ function addWikiTextWithTitle($text, &$title, $linestart = true) {
 240+ $this->addWikiTextTitle($text, $title, $linestart);
241241 }
242242
243 - function addWikiTextTitle($text, $linestart, &$title) {
 243+ function addWikiTextTitle($text, &$title, $linestart) {
244244 global $wgParser, $wgUseTidy;
245245 $parserOutput = $wgParser->parse( $text, $title, $this->mParserOptions, $linestart );
246246 $this->mLanguageLinks += $parserOutput->getLanguageLinks();
247247 $this->mCategoryLinks += $parserOutput->getCategoryLinks();
248248 $this->addHTML( $parserOutput->getText() );
249 -
250249 }
251250
252251 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r91264Follow-up to r9125 - better initialization of variablesyaron14:30, 1 July 2011

Status & tagging log