r80479 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80478‎ | r80479 | r80480 >
Date:00:12, 18 January 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Error when MW older then 1.17
Modified paths:
  • /branches/Maps0.8/INSTALL (modified) (history)
  • /branches/Maps0.8/Maps.php (modified) (history)
  • /branches/Maps0.8/Maps_Settings.php (modified) (history)
  • /branches/Maps0.8/RELEASE-NOTES (modified) (history)

Diff [purge]

Index: branches/Maps0.8/INSTALL
@@ -1,4 +1,4 @@
2 -[[Maps 0.7.4]]
 2+[[Maps 0.8]]
33
44 In order to use this version of Maps, you need to have Validator 0.3.6 installed. If you get a distribution
55 from this page, you don't need to bother this, since Validator comes bundled with every release, and will
Index: branches/Maps0.8/Maps.php
@@ -26,6 +26,10 @@
2727 die( 'Not an entry point.' );
2828 }
2929
 30+if ( version_compare( $wgVersion, '1.17', '<' ) ) {
 31+ die( '<b>Error:</b> This version of Maps requires MediaWiki 1.17 or above; use Maps 0.7.x for older versions.' );
 32+}
 33+
3034 // Include the Validator extension if that hasn't been done yet, since it's required for Maps to work.
3135 if ( !defined( 'Validator_VERSION' ) ) {
3236 @include_once( dirname( __FILE__ ) . '/../Validator/Validator.php' );
@@ -36,7 +40,7 @@
3741 die( '<b>Error:</b> You need to have <a href="http://www.mediawiki.org/wiki/Extension:Validator">Validator</a> installed in order to use <a href="http://www.mediawiki.org/wiki/Extension:Maps">Maps</a>.<br />' );
3842 }
3943 else {
40 - define( 'Maps_VERSION', '0.7.4 alpha' );
 44+ define( 'Maps_VERSION', '0.8 alpha' );
4145
4246 // The different coordinate notations.
4347 define( 'Maps_COORDS_FLOAT', 'float' );
@@ -44,10 +48,8 @@
4549 define( 'Maps_COORDS_DM', 'dm' );
4650 define( 'Maps_COORDS_DD', 'dd' );
4751
48 - $useExtensionPath = version_compare( $wgVersion, '1.16', '>=' ) && isset( $wgExtensionAssetsPath ) && $wgExtensionAssetsPath;
49 - $egMapsScriptPath = ( $useExtensionPath ? $wgExtensionAssetsPath : $wgScriptPath . '/extensions' ) . '/Maps';
 52+ $egMapsScriptPath = $wgExtensionAssetsPath . '/Maps';
5053 $egMapsDir = dirname( __FILE__ ) . '/';
51 - unset( $useExtensionPath );
5254
5355 $egMapsStyleVersion = $wgStyleVersion . '-' . Maps_VERSION;
5456
Index: branches/Maps0.8/Maps_Settings.php
@@ -248,6 +248,10 @@
249249 # Google Geocoder services.
250250 $egGoogleMapsKey = ''; # http://code.google.com/apis/maps/signup.html
251251
 252+ # If your wiki is accessable via multiple urls, you'll need multiple keys.
 253+ # Example: $egGoogleMapsKeys['http://yourdomain.tld/something'] = 'your key';
 254+ $egGoogleMapsKeys = array();
 255+
252256 # Integer. The default zoom of a map. This value will only be used when the
253257 # user does not provide one.
254258 $egMapsGoogleMapsZoom = 14;
Index: branches/Maps0.8/RELEASE-NOTES
@@ -7,9 +7,11 @@
88 http://mapping.referata.com/wiki/Maps/Version_history#Maps_change_log
99
1010
11 -=== Maps 0.7.4 ===
 11+=== Maps 0.8 ===
1212 (2011-0x-xx)
1313
 14+* Removed compatibility with pre MediaWiki 1.17, in order to make full use of the new features.
 15+
1416 * Added support for the auto-documentation features for parser hooks introduced in Validator 0.4.3.
1517
1618 * Improved KML formatter.

Status & tagging log