From dfb14b5f4cc36aaaa53ad6f21e285c6beb6e4cc9 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 26 Jun 2005 03:21:13 +0000 Subject: [PATCH] bump version to 1.5beta1; fixes for commandline ported from REL1_4 --- includes/DefaultSettings.php | 2 +- maintenance/commandLine.inc | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 402b7d0e12..7418a9deb7 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -18,7 +18,7 @@ if( !defined( 'MEDIAWIKI' ) ) { } /** MediaWiki version number */ -$wgVersion = '1.5alpha2'; +$wgVersion = '1.5beta1'; /** Name of the site. It must be changed in LocalSettings.php */ $wgSitename = 'MediaWiki'; diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc index 6c6b3d483c..0fa7122b2c 100644 --- a/maintenance/commandLine.inc +++ b/maintenance/commandLine.inc @@ -25,6 +25,7 @@ if ( !isset( $optionsWithArgs ) ) { } $self = array_shift( $argv ); +$self = __FILE__; $IP = realpath( dirname( $self ) . "/.." ); chdir( $IP ); @@ -77,7 +78,11 @@ $wgCommandLineMode = true; @ob_end_flush(); $sep = strchr( $include_path = ini_get( "include_path" ), ";" ) ? ";" : ":"; -if ( $sep == ":" && strpos( `hostname`, "wikimedia.org" ) !== false ) { +if (!isset( $wgUseNormalUser ) ) { + $wgUseNormalUser = false; +} + +if ( file_exists( '/home/wikipedia/common/langlist' ) ) { $wgWikiFarm = true; require_once( "$IP/includes/SiteConfiguration.php" ); @@ -109,7 +114,11 @@ if ( $sep == ":" && strpos( `hostname`, "wikimedia.org" ) !== false ) { # 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 ( $_ENV['USER'] == "apache" ) { + $wgUseNormalUser = true; + } + + if ( !$wgUseNormalUser ) { $wgDBuser = $wgDBadminuser = "wikiadmin"; $wgDBpassword = $wgDBadminpassword = trim(`wikiadmin_pass`); } @@ -120,7 +129,7 @@ if ( $sep == ":" && strpos( `hostname`, "wikimedia.org" ) !== false ) { ini_set( "include_path", ".:$IP:$IP/includes:$IP/languages:$IP/maintenance" ); require_once( "$IP/includes/Defines.php" ); - require_once( "/home/wikipedia/common/php-1.4/CommonSettings.php" ); + require_once( "$IP/CommonSettings.php" ); } else { $wgWikiFarm = false; $settingsFile = "$IP/LocalSettings.php"; @@ -145,8 +154,6 @@ if ( $sep == ":" && strpos( `hostname`, "wikimedia.org" ) !== false ) { @ob_end_flush(); # Same with these $wgCommandLineMode = true; -$wgDBuser = $wgDBadminuser; -$wgDBpassword = $wgDBadminpassword; if ( !empty( $wgUseNormalUser ) && isset( $wgDBadminuser ) ) { $wgDBuser = $wgDBadminuser; -- 2.20.1