r83502 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83501‎ | r83502 | r83503 >
Date:02:32, 8 March 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
some renaming
Modified paths:
  • /branches/SemanticMaps0.8/SM_Settings.php (modified) (history)
  • /branches/SemanticMaps0.8/SemanticMaps.php (modified) (history)
  • /branches/SemanticMaps0.8/includes/queryprinters/SM_MapPrinter.php (modified) (history)
  • /branches/SemanticMaps0.8/includes/queryprinters/SM_QueryHandler.php (modified) (history)
  • /branches/SemanticMaps0.8/includes/services/GoogleMaps3/SM_GoogleMaps3.php (modified) (history)

Diff [purge]

Index: branches/SemanticMaps0.8/SM_Settings.php
@@ -21,31 +21,8 @@
2222
2323
2424
25 -# Features configuration
26 -
27 - # (named) Array of String. This array contains the available features for Maps.
28 - # Commenting out the inclusion of any feature will make Maps completely ignore it, and so improve performance.
29 -
30 - # Query printers
31 - include_once $smgDir . 'includes/queryprinters/SM_QueryPrinters.php';
32 - # Form imputs
33 - include_once $smgDir . 'includes/forminputs/SM_FormInputs.php';
34 -
35 -
36 -
3725 # Mapping services configuration
3826
39 - # Include the mapping services that should be loaded into Semantic Maps.
40 - # Commenting or removing a mapping service will cause Semantic Maps to completely ignore it, and so improve performance.
41 - # Google Maps API v2
42 - //include_once $smgDir . 'includes/services/GoogleMaps/SM_GoogleMaps.php';
43 - # Google Maps API v3
44 - include_once $smgDir . 'includes/services/GoogleMaps3/SM_GoogleMaps3.php';
45 - # OpenLayers API
46 - include_once $smgDir . 'includes/services/OpenLayers/SM_OpenLayers.php';
47 - # Yahoo! Maps API
48 - //include_once $smgDir . 'includes/services/YahooMaps/SM_YahooMaps.php';
49 -
5027 # Array of String. The default mapping service for each feature, which will be used when no valid service is provided by the user.
5128 # Each service needs to be enabled, if not, the first one from the available services will be taken.
5229 # Note: The default service needs to be available for the feature you set it for, since it's used as a fallback mechanism.
Index: branches/SemanticMaps0.8/includes/services/GoogleMaps3/SM_GoogleMaps3.php
@@ -20,9 +20,9 @@
2121 die( 'Not an entry point.' );
2222 }
2323
24 -$wgHooks['MappingServiceLoad'][] = 'smfInitGoogleMaps';
 24+$wgHooks['MappingServiceLoad'][] = 'smfInitGoogleMaps3';
2525
26 -function smfInitGoogleMaps() {
 26+function smfInitGoogleMaps3() {
2727 global $wgAutoloadClasses;
2828
2929 $wgAutoloadClasses['SMGoogleMaps3QP'] = dirname( __FILE__ ) . '/SM_GoogleMaps3QP.php';
Index: branches/SemanticMaps0.8/includes/queryprinters/SM_MapPrinter.php
@@ -278,7 +278,7 @@
279279 global $wgTitle;
280280
281281 $parser = new Parser();
282 - $iconUrl = MapsMapper::getImageUrl( $params['icon'] );
 282+ $iconUrl = MapsMapper::getFileUrl( $params['icon'] );
283283 $params['locations'] = array();
284284
285285 foreach ( array_merge( $params['staticlocations'], $queryLocations ) as $location ) {
Index: branches/SemanticMaps0.8/includes/queryprinters/SM_QueryHandler.php
@@ -408,7 +408,7 @@
409409 }
410410 } // Icon can be set even for regular, non-compound queries If it is, though, we have to translate the name into a URL here
411411 elseif ( $this->icon != '' ) {
412 - $icon = MapsMapper::getImageUrl( $this->icon );
 412+ $icon = MapsMapper::getFileUrl( $this->icon );
413413 }
414414
415415 return $icon;
Index: branches/SemanticMaps0.8/SemanticMaps.php
@@ -53,6 +53,26 @@
5454 // Include the settings file.
5555 require_once 'SM_Settings.php';
5656
 57+ # (named) Array of String. This array contains the available features for Maps.
 58+ # Commenting out the inclusion of any feature will make Maps completely ignore it, and so improve performance.
 59+
 60+ # Query printers
 61+ include_once $smgDir . 'includes/queryprinters/SM_QueryPrinters.php';
 62+ # Form imputs
 63+ include_once $smgDir . 'includes/forminputs/SM_FormInputs.php';
 64+
 65+ # Include the mapping services that should be loaded into Semantic Maps.
 66+ # Commenting or removing a mapping service will cause Semantic Maps to completely ignore it, and so improve performance.
 67+
 68+ # Google Maps API v2
 69+ include_once $smgDir . 'includes/services/GoogleMaps/SM_GoogleMaps.php';
 70+ # Google Maps API v3
 71+ include_once $smgDir . 'includes/services/GoogleMaps3/SM_GoogleMaps3.php';
 72+ # OpenLayers API
 73+ include_once $smgDir . 'includes/services/OpenLayers/SM_OpenLayers.php';
 74+ # Yahoo! Maps API
 75+ include_once $smgDir . 'includes/services/YahooMaps/SM_YahooMaps.php';
 76+
5777 $wgExtensionFunctions[] = 'smfSetup';
5878
5979 $wgExtensionMessagesFiles['SemanticMaps'] = $smgDir . 'SemanticMaps.i18n.php';
@@ -101,19 +121,12 @@
102122 foreach ( MapsMappingServices::getServiceIdentifiers() as $identifier ) $services[] = wfMsg( 'maps_' . $identifier );
103123 $servicesList = $wgLang->listToText( $services );
104124
105 - // This function has been deprecated in 1.16, but needed for earlier versions.
106 - // It's present in 1.16 as a stub, but lets check if it exists in case it gets removed at some point.
107 - if ( function_exists( 'wfLoadExtensionMessages' ) ) {
108 - wfLoadExtensionMessages( 'SemanticMaps' );
109 - }
110 -
111125 $wgExtensionCredits[defined( 'SEMANTIC_EXTENSION_TYPE' ) ? 'semantic' : 'other'][] = array(
112126 'path' => __FILE__,
113127 'name' => wfMsg( 'semanticmaps_name' ),
114128 'version' => SM_VERSION,
115129 'author' => array(
116 - '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]',
117 - '[http://www.mediawiki.org/wiki/Extension:Semantic_Maps/Credits ' . wfMsg( 'maps-others' ) . ']'
 130+ '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]'
118131 ),
119132 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Maps',
120133 'description' => wfMsgExt( 'semanticmaps_desc', 'parsemag', $servicesList ),

Status & tagging log