Index: trunk/extensions/SemanticMaps/Services/YahooMaps/SM_YahooMaps.php |
— | — | @@ -20,9 +20,20 @@ |
21 | 21 | die( 'Not an entry point.' ); |
22 | 22 | } |
23 | 23 | |
24 | | -$wgAutoloadClasses['SMYahooMapsQP'] = dirname( __FILE__ ) . '/SM_YahooMapsQP.php'; |
25 | | -// TODO: the if should not be needed, but when omitted, a fatal error occurs cause the class that's extended by this one is not found. |
26 | | -if ( defined( 'SF_VERSION' ) ) $wgAutoloadClasses['SMYahooMapsFormInput'] = dirname( __FILE__ ) . '/SM_YahooMapsFormInput.php'; |
| 24 | +$wgHooks['MappingServiceLoad'][] = 'smfInitYahooMaps'; |
27 | 25 | |
28 | | -$egMapsServices['yahoomaps']['features']['qp'] = 'SMYahooMapsQP'; |
29 | | -$egMapsServices['yahoomaps']['features']['fi'] = 'SMYahooMapsFormInput'; |
\ No newline at end of file |
| 26 | +function smfInitYahooMaps() { |
| 27 | + global $egMapsServices, $wgAutoloadClasses; |
| 28 | + |
| 29 | + $wgAutoloadClasses['SMYahooMapsQP'] = dirname( __FILE__ ) . '/SM_YahooMapsQP.php'; |
| 30 | + |
| 31 | + // TODO: the if should not be needed, but when omitted, a fatal error occurs cause the class that's extended by this one is not found. |
| 32 | + if ( defined( 'SF_VERSION' ) ) $wgAutoloadClasses['SMYahooMapsFormInput'] = dirname( __FILE__ ) . '/SM_YahooMapsFormInput.php'; |
| 33 | + |
| 34 | + if ( array_key_exists( 'yahoomaps', $egMapsServices ) ) { |
| 35 | + $egMapsServices['yahoomaps']->addFeature( 'qp', 'SMYahooMapsQP' ); |
| 36 | + $egMapsServices['yahoomaps']->addFeature( 'fi', 'SMYahooMapsFormInput' ); |
| 37 | + } |
| 38 | + |
| 39 | + return true; |
| 40 | +} |
\ No newline at end of file |
Index: trunk/extensions/SemanticMaps/Services/OpenLayers/SM_OpenLayers.php |
— | — | @@ -20,9 +20,20 @@ |
21 | 21 | die( 'Not an entry point.' ); |
22 | 22 | } |
23 | 23 | |
24 | | -$wgAutoloadClasses['SMOpenLayersQP'] = dirname( __FILE__ ) . '/SM_OpenLayersQP.php'; |
25 | | -// TODO: the if should not be needed, but when omitted, a fatal error occurs cause the class that's extended by this one is not found. |
26 | | -if ( defined( 'SF_VERSION' ) ) $wgAutoloadClasses['SMOpenLayersFormInput'] = dirname( __FILE__ ) . '/SM_OpenLayersFormInput.php'; |
| 24 | +$wgHooks['MappingServiceLoad'][] = 'smfInitOpenLayers'; |
27 | 25 | |
28 | | -$egMapsServices['openlayers']['features']['qp'] = 'SMOpenLayersQP'; |
29 | | -$egMapsServices['openlayers']['features']['fi'] = 'SMOpenLayersFormInput'; |
\ No newline at end of file |
| 26 | +function smfInitOpenLayers() { |
| 27 | + global $egMapsServices, $wgAutoloadClasses; |
| 28 | + |
| 29 | + $wgAutoloadClasses['SMOpenLayersQP'] = dirname( __FILE__ ) . '/SM_OpenLayersQP.php'; |
| 30 | + |
| 31 | + // TODO: the if should not be needed, but when omitted, a fatal error occurs cause the class that's extended by this one is not found. |
| 32 | + if ( defined( 'SF_VERSION' ) ) $wgAutoloadClasses['SMOpenLayersFormInput'] = dirname( __FILE__ ) . '/SM_OpenLayersFormInput.php'; |
| 33 | + |
| 34 | + if ( array_key_exists( 'openlayers', $egMapsServices ) ) { |
| 35 | + $egMapsServices['openlayers']->addFeature( 'qp', 'SMOpenLayersQP' ); |
| 36 | + $egMapsServices['openlayers']->addFeature( 'fi', 'SMOpenLayersFormInput' ); |
| 37 | + } |
| 38 | + |
| 39 | + return true; |
| 40 | +} |
\ No newline at end of file |
Index: trunk/extensions/SemanticMaps/Services/GoogleMaps/SM_GoogleMaps.php |
— | — | @@ -20,9 +20,20 @@ |
21 | 21 | die( 'Not an entry point.' ); |
22 | 22 | } |
23 | 23 | |
24 | | -$wgAutoloadClasses['SMGoogleMapsQP'] = dirname( __FILE__ ) . '/SM_GoogleMapsQP.php'; |
25 | | -// TODO: the if should not be needed, but when omitted, a fatal error occurs cause the class that's extended by this one is not found. |
26 | | -if ( defined( 'SF_VERSION' ) ) $wgAutoloadClasses['SMGoogleMapsFormInput'] = dirname( __FILE__ ) . '/SM_GoogleMapsFormInput.php'; |
| 24 | +$wgHooks['MappingServiceLoad'][] = 'smfInitGoogleMaps'; |
27 | 25 | |
28 | | -$egMapsServices['googlemaps2']['features']['qp'] = 'SMGoogleMapsQP'; |
29 | | -$egMapsServices['googlemaps2']['features']['fi'] = 'SMGoogleMapsFormInput'; |
\ No newline at end of file |
| 26 | +function smfInitGoogleMaps() { |
| 27 | + global $egMapsServices, $wgAutoloadClasses; |
| 28 | + |
| 29 | + $wgAutoloadClasses['SMGoogleMapsQP'] = dirname( __FILE__ ) . '/SM_GoogleMapsQP.php'; |
| 30 | + |
| 31 | + // TODO: the if should not be needed, but when omitted, a fatal error occurs cause the class that's extended by this one is not found. |
| 32 | + if ( defined( 'SF_VERSION' ) ) $wgAutoloadClasses['SMGoogleMapsFormInput'] = dirname( __FILE__ ) . '/SM_GoogleMapsFormInput.php'; |
| 33 | + |
| 34 | + if ( array_key_exists( 'googlemaps2', $egMapsServices ) ) { |
| 35 | + $egMapsServices['googlemaps2']->addFeature( 'qp', 'SMGoogleMapsQP' ); |
| 36 | + $egMapsServices['googlemaps2']->addFeature( 'fi', 'SMGoogleMapsFormInput' ); |
| 37 | + } |
| 38 | + |
| 39 | + return true; |
| 40 | +} |
\ No newline at end of file |
Index: trunk/extensions/SemanticMaps/SemanticMaps.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | |
37 | 37 | // Only initialize the extension when all dependencies are present. |
38 | 38 | if ( defined( 'Maps_VERSION' ) && defined( 'SMW_VERSION' ) ) { |
39 | | - define( 'SM_VERSION', '0.6.3 alpha 2' ); |
| 39 | + define( 'SM_VERSION', '0.6.3 a3' ); |
40 | 40 | |
41 | 41 | $smgScriptPath = ( isset( $wgExtensionAssetsPath ) && $wgExtensionAssetsPath ? $wgExtensionAssetsPath : $wgScriptPath . '/extensions' ) . '/SemanticMaps'; |
42 | 42 | $smgDir = dirname( __FILE__ ) . '/'; |