summaryrefslogtreecommitdiff
path: root/maintenance/commandLine.inc
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2006-10-11 20:21:25 +0000
committerPierre Schmitz <pierre@archlinux.de>2006-10-11 20:21:25 +0000
commitd81f562b712f2387fa02290bf2ca86392ab356f2 (patch)
treed666cdefbe6ac320827a2c6cb473581b46e22c4c /maintenance/commandLine.inc
parent183851b06bd6c52f3cae5375f433da720d410447 (diff)
Aktualisierung auf Version 1.8.1
Diffstat (limited to 'maintenance/commandLine.inc')
-rw-r--r--maintenance/commandLine.inc14
1 files changed, 8 insertions, 6 deletions
diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc
index 2bb5389e..2549057e 100644
--- a/maintenance/commandLine.inc
+++ b/maintenance/commandLine.inc
@@ -28,16 +28,15 @@ if ( !isset( $optionsWithArgs ) ) {
$optionsWithArgs[] = 'conf'; # For specifying the location of LocalSettings.php
$self = array_shift( $argv );
-$self = __FILE__;
-$IP = realpath( dirname( $self ) . '/..' );
+$IP = realpath( dirname( __FILE__ ) . '/..' );
#chdir( $IP );
+require_once( "$IP/StartProfiler.php" );
$options = array();
$args = array();
# Parse arguments
-
for( $arg = reset( $argv ); $arg !== false; $arg = next( $argv ) ) {
if ( $arg == '--' ) {
# End of options, remainder should be considered arguments
@@ -133,6 +132,7 @@ if ( file_exists( '/home/wikipedia/common/langlist' ) ) {
# This is for the IRC scripts, which now run as the apache user
# The apache user doesn't have access to the wikiadmin_pass command
if ( $_ENV['USER'] == 'apache' ) {
+ #if ( posix_geteuid() == 48 ) {
$wgUseNormalUser = true;
}
@@ -141,7 +141,7 @@ if ( file_exists( '/home/wikipedia/common/langlist' ) ) {
$DP = $IP;
ini_set( 'include_path', ".:$IP:$IP/includes:$IP/languages:$IP/maintenance" );
- require_once( $IP.'/includes/ProfilerStub.php' );
+ #require_once( $IP.'/includes/ProfilerStub.php' );
require_once( $IP.'/includes/Defines.php' );
require_once( $IP.'/CommonSettings.php' );
@@ -168,7 +168,7 @@ if ( file_exists( '/home/wikipedia/common/langlist' ) ) {
}
$wgCommandLineMode = true;
$DP = $IP;
- require_once( $IP.'/includes/ProfilerStub.php' );
+ #require_once( $IP.'/includes/ProfilerStub.php' );
require_once( $IP.'/includes/Defines.php' );
require_once( $settingsFile );
ini_set( 'include_path', ".$sep$IP$sep$IP/includes$sep$IP/languages$sep$IP/maintenance" );
@@ -202,9 +202,11 @@ if ( defined( 'MW_CMDLINE_CALLBACK' ) ) {
ini_set( 'memory_limit', -1 );
+$wgShowSQLErrors = true;
+
require_once( 'Setup.php' );
require_once( 'install-utils.inc' );
-$wgTitle = Title::newFromText( 'Command line script' );
+$wgTitle = null; # Much much faster startup than creating a title object
set_time_limit(0);
// --------------------------------------------------------------------