Index: trunk/phase3/maintenance/commandLine.inc |
— | — | @@ -40,9 +40,9 @@ |
41 | 41 | $optionsWithArgs[] = 'wiki'; # For specifying the wiki ID |
42 | 42 | |
43 | 43 | $self = array_shift( $argv ); |
44 | | -$IP = ( getenv('MW_INSTALL_PATH') !== false |
| 44 | +$IP = strval( getenv('MW_INSTALL_PATH') ) !== '' |
45 | 45 | ? getenv('MW_INSTALL_PATH') |
46 | | - : realpath( dirname( __FILE__ ) . '/..' ) ); |
| 46 | + : realpath( dirname( __FILE__ ) . '/..' ); |
47 | 47 | #chdir( $IP ); |
48 | 48 | require_once( "$IP/StartProfiler.php" ); |
49 | 49 | |
— | — | @@ -112,9 +112,8 @@ |
113 | 113 | $wgUseNormalUser = false; |
114 | 114 | } |
115 | 115 | |
116 | | -if ( file_exists( '/home/wikipedia/common/langlist' ) ) { |
| 116 | +if ( file_exists( dirname(__FILE__).'/wikimedia-mode' ) ) { |
117 | 117 | $wgWikiFarm = true; |
118 | | - #$cluster = trim( file_get_contents( '/etc/cluster' ) ); |
119 | 118 | $cluster = 'pmtpa'; |
120 | 119 | require_once( "$IP/includes/AutoLoader.php" ); |
121 | 120 | require_once( "$IP/includes/SiteConfiguration.php" ); |
— | — | @@ -166,16 +165,10 @@ |
167 | 166 | } |
168 | 167 | |
169 | 168 | #require_once( $IP.'/includes/ProfilerStub.php' ); |
170 | | - require_once( $IP.'/includes/Defines.php' ); |
171 | | - require_once( $IP.'/CommonSettings.php' ); |
172 | | - |
173 | | - $bin = '/home/wikipedia/bin'; |
174 | | - if ( $wgUseRootUser ) { |
175 | | - $wgDBuser = $wgDBadminuser = 'root'; |
176 | | - $wgDBpassword = $wgDBadminpassword = trim(`$bin/mysql_root_pass`); |
177 | | - } elseif ( !$wgUseNormalUser ) { |
178 | | - $wgDBuser = $wgDBadminuser = 'wikiadmin'; |
179 | | - $wgDBpassword = $wgDBadminpassword = trim(`$bin/wikiadmin_pass`); |
| 169 | + require( $IP.'/includes/Defines.php' ); |
| 170 | + require( $IP.'/CommonSettings.php' ); |
| 171 | + if ( !$wgUseNormalUser ) { |
| 172 | + require( $IP.'/AdminSettings.php' ); |
180 | 173 | } |
181 | 174 | } else { |
182 | 175 | $wgWikiFarm = false; |