r98410 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98409‎ | r98410 | r98411 >
Date:15:14, 29 September 2011
Author:ialex
Status:ok
Tags:
Comment:
Per Aaron, follow-up r93758: add coments and fix typos
Modified paths:
  • /trunk/phase3/includes/SpecialPageFactory.php (modified) (history)
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialPageFactory.php
@@ -476,9 +476,9 @@
477477
478478 /**
479479 * Just like executePath() but will override global variables and execute
480 - * the page in "inclusion" mode. Returns true if the excution was successful
481 - * or false if there was no such special page, or a title object if it was
482 - * a redirect.
 480+ * the page in "inclusion" mode. Returns true if the execution was
 481+ * successful or false if there was no such special page, or a title object
 482+ * if it was a redirect.
483483 *
484484 * Also saves the current $wgTitle, $wgOut, $wgRequest, $wgUser and $wgLang
485485 * variables so that the special page will get the context it'd expect on a
@@ -509,7 +509,7 @@
510510 // The useful part
511511 $ret = self::executePath( $title, $context, true );
512512
513 - // And restore that globals
 513+ // And restore the old globals
514514 $wgTitle = $oldTitle;
515515 $wgOut = $oldOut;
516516 $wgRequest = $oldRequest;
Index: trunk/phase3/includes/parser/Parser.php
@@ -3221,6 +3221,9 @@
32223222 && $this->mOptions->getAllowSpecialInclusion()
32233223 && $this->ot['html'] )
32243224 {
 3225+ // Pass the template arguments as URL parameters.
 3226+ // "uselang" will have no effect since the Language object
 3227+ // is forced to the one defined in ParserOptions.
32253228 $pageArgs = array();
32263229 for ( $i = 0; $i < $args->getLength(); $i++ ) {
32273230 $bits = $args->item( $i )->splitArg();
@@ -3230,6 +3233,8 @@
32313234 $pageArgs[$name] = $value;
32323235 }
32333236 }
 3237+
 3238+ // Create a new context to execute the special page
32343239 $context = new RequestContext;
32353240 $context->setTitle( $title );
32363241 $context->setRequest( new FauxRequest( $pageArgs ) );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r93758* (bug 15558) Allow includable special pages to be parameterized using wiki s...ialex15:40, 2 August 2011

Status & tagging log