Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Outputs.php |
— | — | @@ -50,13 +50,13 @@ |
51 | 51 | |
52 | 52 | switch ( $id ) { |
53 | 53 | case SMW_HEADER_TOOLTIP: |
54 | | - $wgOut->addModules( 'ext.smw.tooltips' ); |
| 54 | + self::$mHeadItems['smw_tt'] = 'ext.smw.tooltips'; |
55 | 55 | break; |
56 | 56 | case SMW_HEADER_SORTTABLE: |
57 | | - $wgOut->addModules( 'ext.smw.sorttable' ); |
| 57 | + self::$mHeadItems['smw_st'] = 'ext.smw.sorttable'; |
58 | 58 | break; |
59 | 59 | case SMW_HEADER_STYLE: |
60 | | - $wgOut->addModules( 'ext.smw.style' ); |
| 60 | + self::$mHeadItems['smw_css'] = 'ext.smw.style'; |
61 | 61 | break; |
62 | 62 | } |
63 | 63 | } |
— | — | @@ -166,10 +166,16 @@ |
167 | 167 | * @param ParserOutput $parserOutput |
168 | 168 | */ |
169 | 169 | static public function commitToParserOutput( ParserOutput $parserOutput ) { |
170 | | - foreach ( self::$mHeadItems as $key => $item ) { |
171 | | - $parserOutput->addHeadItem( "\t\t" . $item . "\n", $key ); |
| 170 | + // Check if the resource loader can be used or not. |
| 171 | + if ( method_exists( 'OutputPage', 'addModules' ) ) { |
| 172 | + $parserOutput->addModules( array_values( self::$mHeadItems ) ); |
172 | 173 | } |
173 | | - |
| 174 | + else { |
| 175 | + foreach ( self::$mHeadItems as $key => $item ) { |
| 176 | + $parserOutput->addHeadItem( "\t\t" . $item . "\n", $key ); |
| 177 | + } |
| 178 | + } |
| 179 | + |
174 | 180 | self::$mHeadItems = array(); |
175 | 181 | } |
176 | 182 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_SetupLight.php |
— | — | @@ -14,7 +14,7 @@ |
15 | 15 | * @ingroup SMW |
16 | 16 | */ |
17 | 17 | |
18 | | -define( 'SMW_VERSION', '1.5.3-light rc1' ); |
| 18 | +define( 'SMW_VERSION', '1.5.3-light rc2' ); |
19 | 19 | |
20 | 20 | require_once( 'SMW_GlobalFunctions.php' ); |
21 | 21 | |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_Setup.php |
— | — | @@ -8,7 +8,7 @@ |
9 | 9 | */ |
10 | 10 | |
11 | 11 | // The SMW version number. |
12 | | -define( 'SMW_VERSION', '1.5.3 rc1' ); |
| 12 | +define( 'SMW_VERSION', '1.5.3 rc2' ); |
13 | 13 | |
14 | 14 | // A flag used to indicate SMW defines a semantic extension type for extension crdits. |
15 | 15 | define( 'SEMANTIC_EXTENSION_TYPE', true ); |
Index: trunk/extensions/SemanticMediaWiki/skins/SMW_custom_rtl.css |
— | — | @@ -1,3 +1,8 @@ |
| 2 | +/* |
| 3 | + * Note: this file is not needed since the introduction of the MediaWiki resource loader, |
| 4 | + * so it can be removed as soon as the minimun MW compatibility becomes >= 1.17. |
| 5 | + */ |
| 6 | + |
2 | 7 | /* tables for inline queries */ |
3 | 8 | table.smwtable th, table.smwtable td { |
4 | 9 | text-align: right; |
Index: trunk/extensions/SemanticMediaWiki/SMW.hooks.php |
— | — | @@ -29,8 +29,7 @@ |
30 | 30 | |
31 | 31 | $modules = array( |
32 | 32 | 'ext.smw.style' => array( |
33 | | - // FIXME: Won't work right, ResourceLoader does RTL flipping itself |
34 | | - 'styles' => ( $wgContLang->isRTL() ? 'SMW_custom_rtl.css' : 'SMW_custom.css' ) |
| 33 | + 'styles' => 'SMW_custom.css' |
35 | 34 | ), |
36 | 35 | 'ext.smw.tooltips' => array( |
37 | 36 | 'scripts' => 'SMW_tooltip.js', |
— | — | @@ -50,7 +49,8 @@ |
51 | 50 | $name, |
52 | 51 | new ResourceLoaderFileModule( |
53 | 52 | array_merge_recursive( $resources, array( 'group' => 'ext.smw' ) ), |
54 | | - dirname( __FILE__ ) . '/skins', $smwgScriptPath . '/skins' |
| 53 | + dirname( __FILE__ ) . '/skins', |
| 54 | + $smwgScriptPath . '/skins' |
55 | 55 | ) |
56 | 56 | ); |
57 | 57 | } |