Index: trunk/extensions/Translate/CreateMessageIndex.php |
— | — | @@ -1,7 +1,9 @@ |
2 | 2 | <?php |
3 | | -$IP = "../../maintenance/"; |
4 | | -require_once( $IP . 'commandLine.inc' ); |
5 | 3 | |
| 4 | +$dir = dirname( __FILE__ ); $IP = "$dir/../.."; |
| 5 | +@include("$dir/../CorePath.php"); // Allow override |
| 6 | +require_once( "$IP/maintenance/commandLine.inc" ); |
| 7 | + |
6 | 8 | $groups = MessageGroups::singleton()->getGroups(); |
7 | 9 | |
8 | 10 | $hugearray = array(); |
Index: trunk/extensions/Translate/groupStatistics.php |
— | — | @@ -12,14 +12,16 @@ |
13 | 13 | |
14 | 14 | $optionsWithArgs = array( 'groups', 'output', 'skiplanguages', ); |
15 | 15 | |
| 16 | +$dir = dirname( __FILE__ ); $IP = "$dir/../.."; |
| 17 | +@include("$dir/../CorePath.php"); // Allow override |
| 18 | +require_once( "$IP/maintenance/commandLine.inc" ); |
| 19 | + |
16 | 20 | function stderr( $message ) { |
17 | 21 | static $stderr = null; |
18 | 22 | if (is_null($stderr)) $stderr = fopen( "php://stderr", "wt" ); |
19 | 23 | fwrite( $stderr, $message . "\n" ); |
20 | 24 | } |
21 | 25 | |
22 | | -$MY_IP = "../../maintenance"; |
23 | | -require_once( $MY_IP . '/commandLine.inc' ); |
24 | 26 | require_once( $IP . '/maintenance/language/StatOutputs.php' ); |
25 | 27 | |
26 | 28 | if ( isset( $options['help'] ) ) { |
Index: trunk/extensions/Translate/poimport.php |
— | — | @@ -9,8 +9,9 @@ |
10 | 10 | |
11 | 11 | $optionsWithArgs = array( 'file', 'user' ); |
12 | 12 | |
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" ); |
15 | 16 | |
16 | 17 | function showUsage() { |
17 | 18 | print <<<EOT |
Index: trunk/extensions/Translate/autoexport.php |
— | — | @@ -2,8 +2,9 @@ |
3 | 3 | |
4 | 4 | $optionsWithArgs = array( 'skip', 'hours', 'format', 'target' ); |
5 | 5 | |
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" ); |
8 | 9 | |
9 | 10 | function showUsage() { |
10 | 11 | print <<<EOT |
Index: trunk/extensions/Translate/export.php |
— | — | @@ -2,8 +2,9 @@ |
3 | 3 | |
4 | 4 | $optionsWithArgs = array( 'lang', 'target', 'group' ); |
5 | 5 | |
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" ); |
8 | 9 | |
9 | 10 | function showUsage() { |
10 | 11 | print <<<EOT |
Index: trunk/extensions/Translate/fuzzy.php |
— | — | @@ -10,10 +10,10 @@ |
11 | 11 | * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later |
12 | 12 | */ |
13 | 13 | |
| 14 | +$dir = dirname( __FILE__ ); $IP = "$dir/../.."; |
| 15 | +@include("$dir/../CorePath.php"); // Allow override |
| 16 | +require_once( "$IP/maintenance/commandLine.inc" ); |
14 | 17 | |
15 | | -$IP = "../../maintenance/"; |
16 | | -require_once( $IP . 'commandLine.inc' ); |
17 | | - |
18 | 18 | if ( count( $args ) == 0 || isset( $options['help'] ) ) { |
19 | 19 | print <<<EOT |
20 | 20 | Fuzzy bot command line script |