r33922 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r33921‎ | r33922 | r33923 >
Date:18:33, 26 April 2008
Author:nikerabbit
Status:old
Tags:
Comment:
* Allow setting path to mediawiki installation in extensions/CorePath.php
Modified paths:
  • /trunk/extensions/Translate/CreateMessageIndex.php (modified) (history)
  • /trunk/extensions/Translate/autoexport.php (modified) (history)
  • /trunk/extensions/Translate/export.php (modified) (history)
  • /trunk/extensions/Translate/fuzzy.php (modified) (history)
  • /trunk/extensions/Translate/groupStatistics.php (modified) (history)
  • /trunk/extensions/Translate/poimport.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/CreateMessageIndex.php
@@ -1,7 +1,9 @@
22 <?php
3 -$IP = "../../maintenance/";
4 -require_once( $IP . 'commandLine.inc' );
53
 4+$dir = dirname( __FILE__ ); $IP = "$dir/../..";
 5+@include("$dir/../CorePath.php"); // Allow override
 6+require_once( "$IP/maintenance/commandLine.inc" );
 7+
68 $groups = MessageGroups::singleton()->getGroups();
79
810 $hugearray = array();
Index: trunk/extensions/Translate/groupStatistics.php
@@ -12,14 +12,16 @@
1313
1414 $optionsWithArgs = array( 'groups', 'output', 'skiplanguages', );
1515
 16+$dir = dirname( __FILE__ ); $IP = "$dir/../..";
 17+@include("$dir/../CorePath.php"); // Allow override
 18+require_once( "$IP/maintenance/commandLine.inc" );
 19+
1620 function stderr( $message ) {
1721 static $stderr = null;
1822 if (is_null($stderr)) $stderr = fopen( "php://stderr", "wt" );
1923 fwrite( $stderr, $message . "\n" );
2024 }
2125
22 -$MY_IP = "../../maintenance";
23 -require_once( $MY_IP . '/commandLine.inc' );
2426 require_once( $IP . '/maintenance/language/StatOutputs.php' );
2527
2628 if ( isset( $options['help'] ) ) {
Index: trunk/extensions/Translate/poimport.php
@@ -9,8 +9,9 @@
1010
1111 $optionsWithArgs = array( 'file', 'user' );
1212
13 -$IP = "../../maintenance/";
14 -require_once( $IP . 'commandLine.inc' );
 13+$dir = dirname( __FILE__ ); $IP = "$dir/../..";
 14+@include("$dir/../CorePath.php"); // Allow override
 15+require_once( "$IP/maintenance/commandLine.inc" );
1516
1617 function showUsage() {
1718 print <<<EOT
Index: trunk/extensions/Translate/autoexport.php
@@ -2,8 +2,9 @@
33
44 $optionsWithArgs = array( 'skip', 'hours', 'format', 'target' );
55
6 -$IP = "../../maintenance/";
7 -require_once( $IP . 'commandLine.inc' );
 6+$dir = dirname( __FILE__ ); $IP = "$dir/../..";
 7+@include("$dir/../CorePath.php"); // Allow override
 8+require_once( "$IP/maintenance/commandLine.inc" );
89
910 function showUsage() {
1011 print <<<EOT
Index: trunk/extensions/Translate/export.php
@@ -2,8 +2,9 @@
33
44 $optionsWithArgs = array( 'lang', 'target', 'group' );
55
6 -$IP = "../../maintenance/";
7 -require_once( $IP . 'commandLine.inc' );
 6+$dir = dirname( __FILE__ ); $IP = "$dir/../..";
 7+@include("$dir/../CorePath.php"); // Allow override
 8+require_once( "$IP/maintenance/commandLine.inc" );
89
910 function showUsage() {
1011 print <<<EOT
Index: trunk/extensions/Translate/fuzzy.php
@@ -10,10 +10,10 @@
1111 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1212 */
1313
 14+$dir = dirname( __FILE__ ); $IP = "$dir/../..";
 15+@include("$dir/../CorePath.php"); // Allow override
 16+require_once( "$IP/maintenance/commandLine.inc" );
1417
15 -$IP = "../../maintenance/";
16 -require_once( $IP . 'commandLine.inc' );
17 -
1818 if ( count( $args ) == 0 || isset( $options['help'] ) ) {
1919 print <<<EOT
2020 Fuzzy bot command line script

Status & tagging log