r97723 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97722‎ | r97723 | r97724 >
Date:12:54, 21 September 2011
Author:catrope
Status:ok
Tags:
Comment:
1.17wmf1: Merge r97722 (partial merge of r93758) from 1.18wmf1
Modified paths:
  • /branches/wmf/1.17wmf1/includes/OutputPage.php (modified) (history)
  • /branches/wmf/1.17wmf1/includes/parser/ParserOutput.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/includes/parser/ParserOutput.php
@@ -117,6 +117,9 @@
118118 $mNoGallery = false, # No gallery on category page? (__NOGALLERY__)
119119 $mHeadItems = array(), # Items to put in the <head> section
120120 $mModules = array(), # Modules to be loaded by the resource loader
 121+ $mModuleScripts = array(), # Modules of which only the JS will be loaded by the resource loader
 122+ $mModuleStyles = array(), # Modules of which only the CSSS will be loaded by the resource loader
 123+ $mModuleMessages = array(), # Modules of which only the messages will be loaded by the resource loader
121124 $mOutputHooks = array(), # Hook tags as per $wgParserOutputHooks
122125 $mWarnings = array(), # Warning text to be returned to the user. Wikitext formatted, in the key only
123126 $mSections = array(), # Table of contents
@@ -150,6 +153,9 @@
151154 function getHeadItems() { return $this->mHeadItems; }
152155 function getModules() { return $this->mModules; }
153156 function getSubtitle() { return $this->mSubtitle; }
 157+ function getModuleScripts() { return $this->mModuleScripts; }
 158+ function getModuleStyles() { return $this->mModuleStyles; }
 159+ function getModuleMessages() { return $this->mModuleMessages; }
154160 function getOutputHooks() { return (array)$this->mOutputHooks; }
155161 function getWarnings() { return array_keys( $this->mWarnings ); }
156162 function getIndexPolicy() { return $this->mIndexPolicy; }
@@ -271,10 +277,22 @@
272278 }
273279 }
274280
275 - function addModules( $modules ) {
 281+ public function addModules( $modules ) {
276282 $this->mModules = array_merge( $this->mModules, (array) $modules );
277283 }
278284
 285+ public function addModuleScripts( $modules ) {
 286+ $this->mModuleScripts = array_merge( $this->mModuleScripts, (array)$modules );
 287+ }
 288+
 289+ public function addModuleStyles( $modules ) {
 290+ $this->mModuleStyles = array_merge( $this->mModuleStyles, (array)$modules );
 291+ }
 292+
 293+ public function addModuleMessages( $modules ) {
 294+ $this->mModuleMessages = array_merge( $this->mModuleMessages, (array)$modules );
 295+ }
 296+
279297 /**
280298 * Override the title to be used for display
281299 * -- this is assumed to have been validated
Property changes on: branches/wmf/1.17wmf1/includes/parser/ParserOutput.php
___________________________________________________________________
Added: svn:mergeinfo
282300 Merged /branches/new-installer/phase3/includes/parser/ParserOutput.php:r43664-66004
283301 Merged /branches/wmf-deployment/includes/parser/ParserOutput.php:r53381,60970
284302 Merged /branches/REL1_15/phase3/includes/parser/ParserOutput.php:r51646
285303 Merged /branches/wmf/1.18wmf1/includes/parser/ParserOutput.php:r97722
286304 Merged /branches/wmf/1.16wmf4/includes/parser/ParserOutput.php:r67177,69199,76243,77266
287305 Merged /branches/sqlite/includes/parser/ParserOutput.php:r58211-58321
288306 Merged /trunk/phase3/includes/parser/ParserOutput.php:r83590,89512-89513,92580,92634,92713,92762,92765,92791,92854,92884,92886-92887,92894,92898,92907,92932,92958,93141,93149,93151,93233-93234,93258,93266,93303,93516-93518,93758,93818-93822,93847,93858,93891,93935-93936,94058,94062,94068,94107,94155,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
Index: branches/wmf/1.17wmf1/includes/OutputPage.php
@@ -1198,6 +1198,10 @@
11991199 $this->mNoGallery = $parserOutput->getNoGallery();
12001200 $this->mHeadItems = array_merge( $this->mHeadItems, $parserOutput->getHeadItems() );
12011201 $this->addModules( $parserOutput->getModules() );
 1202+ $this->addModuleScripts( $parserOutput->getModuleScripts() );
 1203+ $this->addModuleStyles( $parserOutput->getModuleStyles() );
 1204+ $this->addModuleMessages( $parserOutput->getModuleMessages() );
 1205+
12021206 // Versioning...
12031207 foreach ( (array)$parserOutput->mTemplateIds as $ns => $dbks ) {
12041208 if ( isset( $this->mTemplateIds[$ns] ) ) {
Property changes on: branches/wmf/1.17wmf1/includes/OutputPage.php
___________________________________________________________________
Modified: svn:mergeinfo
12051209 Merged /branches/wmf/1.18wmf1/includes/OutputPage.php:r97722
12061210 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