r74003 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74002‎ | r74003 | r74004 >
Date:23:19, 29 September 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Added FIXME for issue caused by resource loader changes
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_Outputs.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Outputs.php
@@ -1,12 +1,4 @@
22 <?php
3 -/**
4 - * This file contains the SMWOutputs class.
5 - *
6 - * @author Markus Krötzsch
7 - *
8 - * @file
9 - * @ingroup SMW
10 - */
113
124 /**
135 * This class attempts to provide safe yet simple means for managing data that is relevant
@@ -28,12 +20,15 @@
2921 * that creates SMW outputs that may require head items must afterwards clear the temporal store by
3022 * writing its contents to the according output.
3123 *
 24+ * @file SMW_Ouputs.php
3225 * @ingroup SMW
 26+ *
 27+ * @author Markus Krötzsch
3328 */
3429 class SMWOutputs {
3530
36 - /// Protected member function for temporarily storing header items
37 - static protected $mHeadItems = array();
 31+ /// Protected member function for temporarily storing header items.
 32+ protected static $mHeadItems = array();
3833
3934 /**
4035 * Announce that some head item (usually CSS or JavaScript) is required to
@@ -54,6 +49,9 @@
5550 * @param $id string or predefined constant for identifying a head item
5651 * @param $item string containing a complete HTML-compatibly text snippet that
5752 * should go into the HTML header; only required if $id is no built-in constant.
 53+ *
 54+ * FIXME: switch on precence of the resource loader (introduced in MW 1.17).
 55+ * SMW_sorttable.js uses addOnloadHook and breaks as it is now on 1.17.
5856 */
5957 static public function requireHeadItem( $id, $item = '' ) {
6058 if ( is_numeric( $id ) ) {
@@ -129,7 +127,6 @@
130128 * @param ParserOutput $parserOutput
131129 */
132130 static public function commitToParserOutput( ParserOutput $parserOutput ) {
133 - // debug_zval_dump(self::$mItems);
134131 foreach ( self::$mHeadItems as $key => $item ) {
135132 $parserOutput->addHeadItem( "\t\t" . $item . "\n", $key );
136133 }
@@ -154,4 +151,5 @@
155152
156153 self::$mHeadItems = array();
157154 }
 155+
158156 }
\ No newline at end of file

Status & tagging log