Index: branches/wmf/1.18wmf1/includes/parser/ParserOutput.php |
— | — | @@ -130,6 +130,9 @@ |
131 | 131 | $mNoGallery = false, # No gallery on category page? (__NOGALLERY__) |
132 | 132 | $mHeadItems = array(), # Items to put in the <head> section |
133 | 133 | $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 |
134 | 137 | $mOutputHooks = array(), # Hook tags as per $wgParserOutputHooks |
135 | 138 | $mWarnings = array(), # Warning text to be returned to the user. Wikitext formatted, in the key only |
136 | 139 | $mSections = array(), # Table of contents |
— | — | @@ -195,6 +198,9 @@ |
196 | 199 | function getNoGallery() { return $this->mNoGallery; } |
197 | 200 | function getHeadItems() { return $this->mHeadItems; } |
198 | 201 | function getModules() { return $this->mModules; } |
| 202 | + function getModuleScripts() { return $this->mModuleScripts; } |
| 203 | + function getModuleStyles() { return $this->mModuleStyles; } |
| 204 | + function getModuleMessages() { return $this->mModuleMessages; } |
199 | 205 | function getOutputHooks() { return (array)$this->mOutputHooks; } |
200 | 206 | function getWarnings() { return array_keys( $this->mWarnings ); } |
201 | 207 | function getIndexPolicy() { return $this->mIndexPolicy; } |
— | — | @@ -334,10 +340,22 @@ |
335 | 341 | } |
336 | 342 | } |
337 | 343 | |
338 | | - function addModules( $modules ) { |
| 344 | + public function addModules( $modules ) { |
339 | 345 | $this->mModules = array_merge( $this->mModules, (array) $modules ); |
340 | 346 | } |
341 | 347 | |
| 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 | + |
342 | 360 | /** |
343 | 361 | * Override the title to be used for display |
344 | 362 | * -- this is assumed to have been validated |
Property changes on: branches/wmf/1.18wmf1/includes/parser/ParserOutput.php |
___________________________________________________________________ |
Added: svn:mergeinfo |
345 | 363 | Merged /branches/new-installer/phase3/includes/parser/ParserOutput.php:r43664-66004 |
346 | 364 | Merged /branches/wmf-deployment/includes/parser/ParserOutput.php:r53381 |
347 | 365 | Merged /branches/REL1_15/phase3/includes/parser/ParserOutput.php:r51646 |
348 | 366 | Merged /branches/sqlite/includes/parser/ParserOutput.php:r58211-58321 |
349 | 367 | 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 @@ |
1384 | 1384 | $this->mNoGallery = $parserOutput->getNoGallery(); |
1385 | 1385 | $this->mHeadItems = array_merge( $this->mHeadItems, $parserOutput->getHeadItems() ); |
1386 | 1386 | $this->addModules( $parserOutput->getModules() ); |
| 1387 | + $this->addModuleScripts( $parserOutput->getModuleScripts() ); |
| 1388 | + $this->addModuleStyles( $parserOutput->getModuleStyles() ); |
| 1389 | + $this->addModuleMessages( $parserOutput->getModuleMessages() ); |
1387 | 1390 | |
1388 | 1391 | // Template versioning... |
1389 | 1392 | foreach ( (array)$parserOutput->getTemplateIds() as $ns => $dbks ) { |
Property changes on: branches/wmf/1.18wmf1/includes/OutputPage.php |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1390 | 1393 | Merged /trunk/phase3/includes/OutputPage.php:r93758 |