r97722 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97721‎ | r97722 | r97723 >
Date:12:42, 21 September 2011
Author:catrope
Status:ok
Tags:
Comment:
1.18wmf1: Partial merge of r93758: add addModule{Scripts,Styles,Messages}() to ParserOutput
Modified paths:
  • /branches/wmf/1.18wmf1/includes/OutputPage.php (modified) (history)
  • /branches/wmf/1.18wmf1/includes/parser/ParserOutput.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.18wmf1/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
@@ -195,6 +198,9 @@
196199 function getNoGallery() { return $this->mNoGallery; }
197200 function getHeadItems() { return $this->mHeadItems; }
198201 function getModules() { return $this->mModules; }
 202+ function getModuleScripts() { return $this->mModuleScripts; }
 203+ function getModuleStyles() { return $this->mModuleStyles; }
 204+ function getModuleMessages() { return $this->mModuleMessages; }
199205 function getOutputHooks() { return (array)$this->mOutputHooks; }
200206 function getWarnings() { return array_keys( $this->mWarnings ); }
201207 function getIndexPolicy() { return $this->mIndexPolicy; }
@@ -334,10 +340,22 @@
335341 }
336342 }
337343
338 - function addModules( $modules ) {
 344+ public function addModules( $modules ) {
339345 $this->mModules = array_merge( $this->mModules, (array) $modules );
340346 }
341347
 348+ public function addModuleScripts( $modules ) {
 349+ $this->mModuleScripts = array_merge( $this->mModuleScripts, (array)$modules );
 350+ }
 351+
 352+ public function addModuleStyles( $modules ) {
 353+ $this->mModuleStyles = array_merge( $this->mModuleStyles, (array)$modules );
 354+ }
 355+
 356+ public function addModuleMessages( $modules ) {
 357+ $this->mModuleMessages = array_merge( $this->mModuleMessages, (array)$modules );
 358+ }
 359+
342360 /**
343361 * Override the title to be used for display
344362 * -- this is assumed to have been validated
Property changes on: branches/wmf/1.18wmf1/includes/parser/ParserOutput.php
___________________________________________________________________
Added: svn:mergeinfo
345363 Merged /branches/new-installer/phase3/includes/parser/ParserOutput.php:r43664-66004
346364 Merged /branches/wmf-deployment/includes/parser/ParserOutput.php:r53381
347365 Merged /branches/REL1_15/phase3/includes/parser/ParserOutput.php:r51646
348366 Merged /branches/sqlite/includes/parser/ParserOutput.php:r58211-58321
349367 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,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.18wmf1/includes/OutputPage.php
@@ -1383,6 +1383,9 @@
13841384 $this->mNoGallery = $parserOutput->getNoGallery();
13851385 $this->mHeadItems = array_merge( $this->mHeadItems, $parserOutput->getHeadItems() );
13861386 $this->addModules( $parserOutput->getModules() );
 1387+ $this->addModuleScripts( $parserOutput->getModuleScripts() );
 1388+ $this->addModuleStyles( $parserOutput->getModuleStyles() );
 1389+ $this->addModuleMessages( $parserOutput->getModuleMessages() );
13871390
13881391 // Template versioning...
13891392 foreach ( (array)$parserOutput->getTemplateIds() as $ns => $dbks ) {
Property changes on: branches/wmf/1.18wmf1/includes/OutputPage.php
___________________________________________________________________
Modified: svn:mergeinfo
13901393 Merged /trunk/phase3/includes/OutputPage.php:r93758

Follow-up revisions

RevisionCommit summaryAuthorDate
r977231.17wmf1: Merge r97722 (partial merge of r93758) from 1.18wmf1catrope12:54, 21 September 2011
r1011251.18: Merge r97722 from 1.18wmf1. This is a partial merge of r93758 that adds...catrope11:10, 28 October 2011

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