r85491 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85490‎ | r85491 | r85492 >
Date:23:30, 5 April 2011
Author:krinkle
Status:deferred
Tags:
Comment:
Implement a simple localconfig option to override settings (currently used for http://toolserver.org/~krinkle/TsIntuition-sandbox/ to modify the path and test tools without showing them in About
Modified paths:
  • /trunk/tools/ToolserverI18N/ToolStart.php (modified) (history)
  • /trunk/tools/ToolserverI18N/TsIntuition.php (modified) (history)

Diff [purge]

Index: trunk/tools/ToolserverI18N/TsIntuition.php
@@ -29,8 +29,11 @@
3030
3131 private $localBaseDir = __DIR__; // to be moved to p_i18n
3232
33 - private $registeredTextdomains;
 33+ public $registeredTextdomains;
3434
 35+ // Address to the dashboard home. Should end with a slash or .extension
 36+ public $dashboardHome = 'http://toolserver.org/~krinkle/TsIntuition/';
 37+
3538 // Construct options
3639 private $currentTextdomain;
3740 private $currentLanguage;
@@ -74,9 +77,6 @@
7578 // These variable names will be extracted from the message files
7679 private $includeVariables = array( 'messages', 'url' );
7780
78 - // Address to the dashboard home. Should end with a slash or .extension
79 - private $dashboardHome = 'http://toolserver.org/~krinkle/TsIntuition/';
80 -
8181 // Redirect address and status
8282 private $redirectTo = null;
8383
@@ -169,6 +169,10 @@
170170 // Initialize language choise
171171 $this->initLangSelect( $options['lang'] );
172172
 173+ if ( function_exists( 'TsIntuition_inithook' ) ) {
 174+ TsIntuition_inithook( $this );
 175+ }
 176+
173177 }
174178
175179
Index: trunk/tools/ToolserverI18N/ToolStart.php
@@ -13,6 +13,12 @@
1414 // This is a valid entry, define true
1515 define( 'TS_INTUITION', __DIR__ );
1616
 17+// Local override
 18+if ( file_exists( __DIR__ . '/LocalConfig.php' ) ) {
 19+ include_once( __DIR__ . '/LocalConfig.php' );
 20+}
 21+
 22+
1723 // Files
1824 require_once( __DIR__ . '/TsIntuitionUtil.php' );
1925 require_once( __DIR__ . '/TsIntuition.php' );

Status & tagging log