Index: trunk/extensions/Maps/Maps.php |
— | — | @@ -140,9 +140,6 @@ |
141 | 141 | // Since 0.7 |
142 | 142 | $wgHooks['SkinAfterBottomScripts'][] = 'MapsHooks::addOnloadFunction'; |
143 | 143 | |
144 | | - // Since 0.7 |
145 | | - $wgHooks['ResourceLoaderRegisterModules'][] = 'MapsHooks::registerResourceLoaderModules'; |
146 | | - |
147 | 144 | // Since 0.7.1 |
148 | 145 | $wgHooks['ArticleFromTitle'][] = 'MapsHooks::onArticleFromTitle'; |
149 | 146 | |
Index: trunk/extensions/Maps/includes/Maps_MappingService.php |
— | — | @@ -41,15 +41,6 @@ |
42 | 42 | protected $features; |
43 | 43 | |
44 | 44 | /** |
45 | | - * A list of names of resource modules to add. |
46 | | - * |
47 | | - * @since 0.7.3 |
48 | | - * |
49 | | - * @var array |
50 | | - */ |
51 | | - protected $resourceModules = array(); |
52 | | - |
53 | | - /** |
54 | 45 | * A list of dependencies (header items) that have been added. |
55 | 46 | * |
56 | 47 | * @since 0.6.3 |
— | — | @@ -123,19 +114,11 @@ |
124 | 115 | if ( $dependencies ) { |
125 | 116 | $parserOrOut->getOutput()->addHeadItem( $dependencies ); |
126 | 117 | } |
127 | | - |
128 | | - if ( $egMapsUseRL /* method_exists( $parserOrOut->getOutput(), 'addModules' ) */ ) { |
129 | | - $parserOrOut->getOutput()->addModules( $this->getResourceModules() ); |
130 | | - } |
131 | 118 | } |
132 | 119 | else if ( $parserOrOut instanceof OutputPage ) { |
133 | 120 | if ( $dependencies ) { |
134 | 121 | $parserOrOut->addHeadItem( md5( $dependencies ), $dependencies ); |
135 | 122 | } |
136 | | - |
137 | | - if ( $egMapsUseRL /* method_exists( $parserOrOut, 'addModules' ) */ ) { |
138 | | - $parserOrOut->addModules( $this->getResourceModules() ); |
139 | | - } |
140 | 123 | } |
141 | 124 | } |
142 | 125 | |
— | — | @@ -231,26 +214,4 @@ |
232 | 215 | return array(); |
233 | 216 | } |
234 | 217 | |
235 | | - /** |
236 | | - * Returns the resource modules that need to be loaded to use this mapping service. |
237 | | - * |
238 | | - * @since 0.7.3 |
239 | | - * |
240 | | - * @return array of string |
241 | | - */ |
242 | | - protected function getResourceModules() { |
243 | | - return $this->resourceModules; |
244 | | - } |
245 | | - |
246 | | - /** |
247 | | - * Add one or more names of resource modules that should be loaded. |
248 | | - * |
249 | | - * @since 0.7.3 |
250 | | - * |
251 | | - * @param mixed $modules Array of string or string |
252 | | - */ |
253 | | - public function addResourceModules( $modules ) { |
254 | | - $this->resourceModules = array_merge( $this->resourceModules, (array)$modules ); |
255 | | - } |
256 | | - |
257 | 218 | } |
\ No newline at end of file |
Index: trunk/extensions/Maps/includes/services/OpenLayers/Maps_OpenLayers.php |
— | — | @@ -177,64 +177,4 @@ |
178 | 178 | } |
179 | 179 | } |
180 | 180 | |
181 | | - /** |
182 | | - * @see MapsMappingService::getResourceModules |
183 | | - * |
184 | | - * @since 0.7.3 |
185 | | - * |
186 | | - * @return array of string |
187 | | - */ |
188 | | - protected function getResourceModules() { |
189 | | - return array_merge( |
190 | | - parent::getResourceModules(), |
191 | | - array( 'ext.maps.openlayers' ) |
192 | | - ); |
193 | | - } |
194 | | - |
195 | | - /** |
196 | | - * Register the resource modules for the resource loader. |
197 | | - * |
198 | | - * @since 0.7.3 |
199 | | - * |
200 | | - * @param ResourceLoader $resourceLoader |
201 | | - * |
202 | | - * @return true |
203 | | - */ |
204 | | - public static function registerResourceLoaderModules( ResourceLoader &$resourceLoader ) { |
205 | | - global $egMapsScriptPath, $egMapsOLLayerModules; |
206 | | - |
207 | | - $modules = array( |
208 | | - 'ext.maps.openlayers' => array( |
209 | | - 'scripts' => array( |
210 | | - 'OpenLayers/OpenLayers.js', |
211 | | - 'ext.maps.openlayers.js' |
212 | | - ), |
213 | | - 'styles' => array( |
214 | | - 'OpenLayers/theme/default/style.css' |
215 | | - ), |
216 | | - 'messages' => array( |
217 | | - 'maps-markers' |
218 | | - ) |
219 | | - ), |
220 | | - ); |
221 | | - |
222 | | - foreach ( $egMapsOLLayerModules as $name => &$data ) { |
223 | | - $data['dependencies'] = array_key_exists( 'dependencies', $data ) ? |
224 | | - array_merge( (array)$data['dependencies'], array( 'ext.maps.openlayers' ) ) : |
225 | | - array( 'ext.maps.openlayers' ); |
226 | | - } |
227 | | - |
228 | | - $modules = array_merge( $modules, $egMapsOLLayerModules ); |
229 | | - |
230 | | - foreach ( $modules as $name => $resources ) { |
231 | | - $resourceLoader->register( $name, new ResourceLoaderFileModule( |
232 | | - array_merge_recursive( $resources, array( 'group' => 'ext.maps' ) ), |
233 | | - dirname( __FILE__ ), |
234 | | - $egMapsScriptPath . '/includes/services/OpenLayers' |
235 | | - ) ); |
236 | | - } |
237 | | - |
238 | | - return true; |
239 | | - } |
240 | | - |
241 | 181 | } |
\ No newline at end of file |
Index: trunk/extensions/Maps/includes/services/OpenLayers/OpenLayers.php |
— | — | @@ -26,9 +26,6 @@ |
27 | 27 | $wgAutoloadClasses['MapsOpenLayersDispPoint'] = dirname( __FILE__ ) . '/Maps_OpenLayersDispPoint.php'; |
28 | 28 | $wgAutoloadClasses['MapsParamOLLayers'] = dirname( __FILE__ ) . '/Maps_ParamOLLayers.php'; |
29 | 29 | |
30 | | -// Since 0.7.3 |
31 | | -$wgHooks['ResourceLoaderRegisterModules'][] = 'MapsOpenLayers::registerResourceLoaderModules'; |
32 | | - |
33 | 30 | MapsMappingServices::registerService( |
34 | 31 | 'openlayers', |
35 | 32 | 'MapsOpenLayers', |
Index: trunk/extensions/Maps/Maps.hooks.php |
— | — | @@ -60,35 +60,6 @@ |
61 | 61 | } |
62 | 62 | |
63 | 63 | /** |
64 | | - * Register the resource modules for the resource loader. |
65 | | - * |
66 | | - * @since 0.7 |
67 | | - * |
68 | | - * @param ResourceLoader $resourceLoader |
69 | | - * |
70 | | - * @return true |
71 | | - */ |
72 | | - public static function registerResourceLoaderModules( ResourceLoader &$resourceLoader ) { |
73 | | - global $egMapsScriptPath; |
74 | | - /* |
75 | | - $modules = array( |
76 | | - 'ext.maps.common' => array( |
77 | | - |
78 | | - ), |
79 | | - ); |
80 | | - |
81 | | - foreach ( $modules as $name => $resources ) { |
82 | | - $resourceLoader->register( $name, new ResourceLoaderFileModule( |
83 | | - $resources, |
84 | | - dirname( __FILE__ ), |
85 | | - $egMapsScriptPath' |
86 | | - ) ); |
87 | | - } |
88 | | - */ |
89 | | - return true; |
90 | | - } |
91 | | - |
92 | | - /** |
93 | 64 | * Intercept pages in the Layer namespace to handle them correctly. |
94 | 65 | * |
95 | 66 | * @param $title: Title |