r67906 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67905‎ | r67906 | r67907 >
Date:16:44, 12 June 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.6.3 - follow up to r67904 - not all features are working for now
Modified paths:
  • /trunk/extensions/SemanticMaps/SemanticMaps.php (modified) (history)
  • /trunk/extensions/SemanticMaps/Services/GoogleMaps/SM_GoogleMaps.php (modified) (history)
  • /trunk/extensions/SemanticMaps/Services/OpenLayers/SM_OpenLayers.php (modified) (history)
  • /trunk/extensions/SemanticMaps/Services/YahooMaps/SM_YahooMaps.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMaps/Services/YahooMaps/SM_YahooMaps.php
@@ -20,9 +20,20 @@
2121 die( 'Not an entry point.' );
2222 }
2323
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';
2725
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 @@
2121 die( 'Not an entry point.' );
2222 }
2323
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';
2725
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 @@
2121 die( 'Not an entry point.' );
2222 }
2323
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';
2725
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 @@
3636
3737 // Only initialize the extension when all dependencies are present.
3838 if ( defined( 'Maps_VERSION' ) && defined( 'SMW_VERSION' ) ) {
39 - define( 'SM_VERSION', '0.6.3 alpha 2' );
 39+ define( 'SM_VERSION', '0.6.3 a3' );
4040
4141 $smgScriptPath = ( isset( $wgExtensionAssetsPath ) && $wgExtensionAssetsPath ? $wgExtensionAssetsPath : $wgScriptPath . '/extensions' ) . '/SemanticMaps';
4242 $smgDir = dirname( __FILE__ ) . '/';

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r67904Changes for 0.6.3 - rewrote service handling (incompatible with SM for now)jeroendedauw16:15, 12 June 2010

Status & tagging log