Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Outputs.php |
— | — | @@ -1,12 +1,4 @@ |
2 | 2 | <?php |
3 | | -/** |
4 | | - * This file contains the SMWOutputs class. |
5 | | - * |
6 | | - * @author Markus Krötzsch |
7 | | - * |
8 | | - * @file |
9 | | - * @ingroup SMW |
10 | | - */ |
11 | 3 | |
12 | 4 | /** |
13 | 5 | * This class attempts to provide safe yet simple means for managing data that is relevant |
— | — | @@ -28,12 +20,15 @@ |
29 | 21 | * that creates SMW outputs that may require head items must afterwards clear the temporal store by |
30 | 22 | * writing its contents to the according output. |
31 | 23 | * |
| 24 | + * @file SMW_Ouputs.php |
32 | 25 | * @ingroup SMW |
| 26 | + * |
| 27 | + * @author Markus Krötzsch |
33 | 28 | */ |
34 | 29 | class SMWOutputs { |
35 | 30 | |
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(); |
38 | 33 | |
39 | 34 | /** |
40 | 35 | * Announce that some head item (usually CSS or JavaScript) is required to |
— | — | @@ -54,6 +49,9 @@ |
55 | 50 | * @param $id string or predefined constant for identifying a head item |
56 | 51 | * @param $item string containing a complete HTML-compatibly text snippet that |
57 | 52 | * 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. |
58 | 56 | */ |
59 | 57 | static public function requireHeadItem( $id, $item = '' ) { |
60 | 58 | if ( is_numeric( $id ) ) { |
— | — | @@ -129,7 +127,6 @@ |
130 | 128 | * @param ParserOutput $parserOutput |
131 | 129 | */ |
132 | 130 | static public function commitToParserOutput( ParserOutput $parserOutput ) { |
133 | | - // debug_zval_dump(self::$mItems); |
134 | 131 | foreach ( self::$mHeadItems as $key => $item ) { |
135 | 132 | $parserOutput->addHeadItem( "\t\t" . $item . "\n", $key ); |
136 | 133 | } |
— | — | @@ -154,4 +151,5 @@ |
155 | 152 | |
156 | 153 | self::$mHeadItems = array(); |
157 | 154 | } |
| 155 | + |
158 | 156 | } |
\ No newline at end of file |