Index: branches/Maps0.7.x/includes/services/OpenLayers/OpenLayers.php |
— | — | @@ -26,11 +26,16 @@ |
27 | 27 | $wgAutoloadClasses['MapsOpenLayersDispPoint'] = dirname( __FILE__ ) . '/Maps_OpenLayersDispPoint.php'; |
28 | 28 | $wgAutoloadClasses['MapsParamOLLayers'] = dirname( __FILE__ ) . '/Maps_ParamOLLayers.php'; |
29 | 29 | |
30 | | -MapsMappingServices::registerService( |
31 | | - 'openlayers', |
32 | | - 'MapsOpenLayers', |
33 | | - array( |
34 | | - 'display_point' => 'MapsOpenLayersDispPoint', |
35 | | - 'display_map' => 'MapsOpenLayersDispMap' |
36 | | - ) |
37 | | -); |
| 30 | +$wgHooks['MappingServiceLoad'][] = 'efMapsInitOpenLayers'; |
| 31 | +function efMapsInitOpenLayers() { |
| 32 | + MapsMappingServices::registerService( |
| 33 | + 'openlayers', |
| 34 | + 'MapsOpenLayers', |
| 35 | + array( |
| 36 | + 'display_point' => 'MapsOpenLayersDispPoint', |
| 37 | + 'display_map' => 'MapsOpenLayersDispMap' |
| 38 | + ) |
| 39 | + ); |
| 40 | + |
| 41 | + return true; |
| 42 | +} |