r93606 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93605‎ | r93606 | r93607 >
Date:19:35, 31 July 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
do not call later then 1.16 even if exists; causes warning
Modified paths:
  • /trunk/extensions/SemanticDrilldown/specials/SD_BrowseData.php (modified) (history)
  • /trunk/extensions/SemanticDrilldown/specials/SD_CreateFilter.php (modified) (history)
  • /trunk/extensions/SemanticDrilldown/specials/SD_Filters.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticDrilldown/specials/SD_Filters.php
@@ -5,8 +5,6 @@
66 * @author Yaron Koren
77 */
88
9 -if ( !defined( 'MEDIAWIKI' ) ) die();
10 -
119 class SDFilters extends SpecialPage {
1210
1311 /**
@@ -15,7 +13,7 @@
1614 function __construct() {
1715 parent::__construct( 'Filters' );
1816 // Backwards compatibility for MediaWiki < 1.16
19 - if ( function_exists( 'wfLoadExtensionMessages' ) ) {
 17+ if ( version_compare( $GLOBALS['wgVersion'], '1.16', '<' ) ) {
2018 wfLoadExtensionMessages( 'SemanticDrilldown' );
2119 }
2220 }
Index: trunk/extensions/SemanticDrilldown/specials/SD_CreateFilter.php
@@ -16,7 +16,7 @@
1717 public function SDCreateFilter() {
1818 parent::__construct( 'CreateFilter' );
1919 // Backwards compatibility for MediaWiki < 1.16
20 - if ( function_exists( 'wfLoadExtensionMessages' ) ) {
 20+ if ( version_compare( $GLOBALS['wgVersion'], '1.16', '<' ) ) {
2121 wfLoadExtensionMessages( 'SemanticDrilldown' );
2222 }
2323 }
Index: trunk/extensions/SemanticDrilldown/specials/SD_BrowseData.php
@@ -16,7 +16,7 @@
1717 public function __construct() {
1818 parent::__construct( 'BrowseData' );
1919 // Backwards compatibility for MediaWiki < 1.16
20 - if ( function_exists( 'wfLoadExtensionMessages' ) ) {
 20+ if ( version_compare( $GLOBALS['wgVersion'], '1.16', '<' ) ) {
2121 wfLoadExtensionMessages( 'SemanticDrilldown' );
2222 }
2323 }