r96197 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96196‎ | r96197 | r96198 >
Date:15:18, 3 September 2011
Author:maxsem
Status:ok
Tags:
Comment:
generateTables.php: fixed check for installation of this extension
Modified paths:
  • /trunk/extensions/wikihiero/generateTables.php (modified) (history)

Diff [purge]

Index: trunk/extensions/wikihiero/generateTables.php
@@ -34,14 +34,15 @@
3535 public function __construct() {
3636 parent::__construct();
3737 $this->mDescription = 'Generate tables with hieroglyph information';
38 - // if ( !MWInit::classExists( 'WikiHiero' ) ) {
39 - // $this->error( "Please install WikiHiero first!\n", true );
40 - // }
4138
4239 $this->moreTables = str_replace( "\r", '', $this->moreTables );
4340 }
4441
4542 public function execute() {
 43+ if ( !defined( 'WIKIHIERO_VERSION' ) ) {
 44+ $this->error( "Please install WikiHiero first!\n", true );
 45+ }
 46+
4647 $wh_prefabs = "\$wh_prefabs = array(\n";
4748 $wh_files = "\$wh_files = array(\n";
4849

Status & tagging log