r101125 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r101124‎ | r101125 | r101126 >
Date:11:10, 28 October 2011
Author:catrope
Status:ok
Tags:
Comment:
1.18: Merge r97722 from 1.18wmf1. This is a partial merge of r93758 that adds addModule{Scripts,Styles,Messages}() to ParserOutput
Modified paths:
  • /branches/REL1_18/phase3/includes/OutputPage.php (modified) (history)
  • /branches/REL1_18/phase3/includes/parser/ParserOutput.php (modified) (history)

Diff [purge]

Index: branches/REL1_18/phase3/includes/parser/ParserOutput.php
@@ -130,6 +130,9 @@
131131 $mNoGallery = false, # No gallery on category page? (__NOGALLERY__)
132132 $mHeadItems = array(), # Items to put in the <head> section
133133 $mModules = array(), # Modules to be loaded by the resource loader
 134+ $mModuleScripts = array(), # Modules of which only the JS will be loaded by the resource loader
 135+ $mModuleStyles = array(), # Modules of which only the CSSS will be loaded by the resource loader
 136+ $mModuleMessages = array(), # Modules of which only the messages will be loaded by the resource loader
134137 $mOutputHooks = array(), # Hook tags as per $wgParserOutputHooks
135138 $mWarnings = array(), # Warning text to be returned to the user. Wikitext formatted, in the key only
136139 $mSections = array(), # Table of contents
@@ -197,6 +200,9 @@
198201 function getNoGallery() { return $this->mNoGallery; }
199202 function getHeadItems() { return $this->mHeadItems; }
200203 function getModules() { return $this->mModules; }
 204+ function getModuleScripts() { return $this->mModuleScripts; }
 205+ function getModuleStyles() { return $this->mModuleStyles; }
 206+ function getModuleMessages() { return $this->mModuleMessages; }
201207 function getOutputHooks() { return (array)$this->mOutputHooks; }
202208 function getWarnings() { return array_keys( $this->mWarnings ); }
203209 function getIndexPolicy() { return $this->mIndexPolicy; }
@@ -336,10 +342,22 @@
337343 }
338344 }
339345
340 - function addModules( $modules ) {
 346+ public function addModules( $modules ) {
341347 $this->mModules = array_merge( $this->mModules, (array) $modules );
342348 }
343349
 350+ public function addModuleScripts( $modules ) {
 351+ $this->mModuleScripts = array_merge( $this->mModuleScripts, (array)$modules );
 352+ }
 353+
 354+ public function addModuleStyles( $modules ) {
 355+ $this->mModuleStyles = array_merge( $this->mModuleStyles, (array)$modules );
 356+ }
 357+
 358+ public function addModuleMessages( $modules ) {
 359+ $this->mModuleMessages = array_merge( $this->mModuleMessages, (array)$modules );
 360+ }
 361+
344362 /**
345363 * Override the title to be used for display
346364 * -- this is assumed to have been validated
Property changes on: branches/REL1_18/phase3/includes/parser/ParserOutput.php
___________________________________________________________________
Added: svn:mergeinfo
347365 Merged /branches/new-installer/phase3/includes/parser/ParserOutput.php:r43664-66004
348366 Merged /branches/wmf-deployment/includes/parser/ParserOutput.php:r53381
349367 Merged /branches/REL1_15/phase3/includes/parser/ParserOutput.php:r51646
350368 Merged /branches/wmf/1.18wmf1/includes/parser/ParserOutput.php:r97722,98962,98971,99004,99065
351369 Merged /branches/sqlite/includes/parser/ParserOutput.php:r58211-58321
352370 Merged /trunk/phase3/includes/parser/ParserOutput.php:r92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93726,93758,93818-93822,93847,93858,93891,93935-93936,93977,94058,94062,94068,94107,94155,94199,94235,94277,94346,94372,94422,94425,94444,94448,94456,94498,94517,94601,94630,94728,94738,94825,94862,94995-94997,95023,95042,95072-95073,95155,95327,95332,95410,95422,95426,95442,95468,95601,95812,96178,96182,96437-96438,97291,97806,97815,97895,98069,98193-98194,98210,98212,98235,98237,98298,98374,98379,98411,98426,98502,98610,98612,98656,98676,98703,98707,98713,98716,98718-98720,98755-98756,98760-98761,98774,98812,98880,98884,98927,98963,98975,98990,98997,99081-99082,99102,99104,99118,99126,99135-99136,99138,99172,99250,99252,99254,99304,99308,99318,99323,99349,99370-99371,99630,99632,99680,99694,99700,99897,99910,99914,99931,99952,100021,100115,100219,100221,100223,100226,100239,100242,100347,100510,100572,100592
Index: branches/REL1_18/phase3/includes/OutputPage.php
@@ -1384,6 +1384,9 @@
13851385 $this->mNoGallery = $parserOutput->getNoGallery();
13861386 $this->mHeadItems = array_merge( $this->mHeadItems, $parserOutput->getHeadItems() );
13871387 $this->addModules( $parserOutput->getModules() );
 1388+ $this->addModuleScripts( $parserOutput->getModuleScripts() );
 1389+ $this->addModuleStyles( $parserOutput->getModuleStyles() );
 1390+ $this->addModuleMessages( $parserOutput->getModuleMessages() );
13881391
13891392 // Template versioning...
13901393 foreach ( (array)$parserOutput->getTemplateIds() as $ns => $dbks ) {
Property changes on: branches/REL1_18/phase3/includes/OutputPage.php
___________________________________________________________________
Modified: svn:mergeinfo
13911394 Merged /branches/wmf/1.18wmf1/includes/OutputPage.php:r97722
13921395 Merged /trunk/phase3/includes/OutputPage.php:r93758

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
r977221.18wmf1: Partial merge of r93758: add addModule{Scripts,Styles,Messages}() t...catrope12:42, 21 September 2011

Status & tagging log