r100481 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100480‎ | r100481 | r100482 >
Date:00:46, 22 October 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added version check
Modified paths:
  • /trunk/extensions/SemanticDataTypes/SemanticDataTypes.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticDataTypes/SemanticDataTypes.php
@@ -28,6 +28,15 @@
2929 die( '<b>Error:</b> the Semantic Data Types requires MediaWiki 1.16 or above.' );
3030 }
3131
 32+// Show a warning if Semantic MediaWiki is not loaded.
 33+if ( ! defined( 'SMW_VERSION' ) ) {
 34+ die( '<b>Error:</b> You need to have <a href="http://semantic-mediawiki.org/wiki/Semantic_MediaWiki">Semantic MediaWiki</a> installed in order to use <a href="http://www.mediawiki.org/wiki/Extension:Semantic_Data_Types">Semantic Data Types</a>.<br />' );
 35+}
 36+
 37+if ( version_compare( SMW_VERSION, '1.6 alpha', '<' ) ) {
 38+ die( '<b>Error:</b> Semantic Data Types requires Semantic MediaWiki 1.6 or above.' );
 39+}
 40+
3241 define( 'SDT_VERSION', '0.1 alpha' );
3342
3443 $wgExtensionCredits['semantic'][] = array(