r80478 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r80477‎ | r80478 | r80479 >
Date:23:49, 17 January 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Give error when not 1.17 or above
Modified paths:
  • /branches/SemanticMaps0.8/INSTALL (modified) (history)
  • /branches/SemanticMaps0.8/RELEASE-NOTES (modified) (history)
  • /branches/SemanticMaps0.8/SemanticMaps.php (modified) (history)

Diff [purge]

Index: branches/SemanticMaps0.8/INSTALL
@@ -1,4 +1,4 @@
2 -[[Semantic Maps 0.7.4]]
 2+[[Semantic Maps 0.8]]
33
44 You can find a wiki version of this document, which includes various helpfull links, at
55 http://mapping.referata.com/wiki/Help:Installation#Semantic_Maps
Index: branches/SemanticMaps0.8/RELEASE-NOTES
@@ -7,8 +7,10 @@
88 http://www.mediawiki.org/wiki/Extension:Semantic_Maps/Version_history#Semantic_Maps_change_log
99
1010
11 -=== Semantic Maps 0.7.4 ===
 11+=== Semantic Maps 0.8 ===
 12+(2011-0x-xx)
1213
 14+*
1315
1416 === Semantic Maps 0.7.3 ===
1517 (2010-11-30)
Index: branches/SemanticMaps0.8/SemanticMaps.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 Semantic Maps requires MediaWiki 1.17 or above; use Maps 0.7.x for older versions.' );
 32+}
 33+
3034 // Show a warning if Maps is not loaded.
3135 if ( ! defined( 'Maps_VERSION' ) ) {
3236 die( '<b>Error:</b> You need to have <a href="http://www.mediawiki.org/wiki/Extension:Maps">Maps</a> installed in order to use <a href="http://www.mediawiki.org/wiki/Extension:Semantic Maps">Semantic Maps</a>.<br />' );
@@ -38,12 +42,10 @@
3943
4044 // Only initialize the extension when all dependencies are present.
4145 if ( defined( 'Maps_VERSION' ) && defined( 'SMW_VERSION' ) ) {
42 - define( 'SM_VERSION', '0.7.4 alpha' );
 46+ define( 'SM_VERSION', '0.8 alpha' );
4347
44 - $useExtensionPath = version_compare( $wgVersion, '1.16', '>=' ) && isset( $wgExtensionAssetsPath ) && $wgExtensionAssetsPath;
45 - $smgScriptPath = ( $useExtensionPath ? $wgExtensionAssetsPath : $wgScriptPath . '/extensions' ) . '/SemanticMaps';
 48+ $smgScriptPath = $wgExtensionAssetsPath . '/SemanticMaps';
4649 $smgDir = dirname( __FILE__ ) . '/';
47 - unset( $useExtensionPath );
4850
4951 $smgStyleVersion = $wgStyleVersion . '-' . SM_VERSION;
5052

Status & tagging log