Index: trunk/phase3/maintenance/commandLine.inc |
— | — | @@ -84,22 +84,27 @@ |
85 | 85 | # Get $conf |
86 | 86 | require( "$IP/InitialiseSettings.php" ); |
87 | 87 | |
88 | | - # Check if we were passed a db name |
89 | | - $db = array_shift( $args ); |
90 | | - list( $site, $lang ) = $conf->siteFromDB( $db ); |
| 88 | + if ( empty( $wgNoDBParam ) ) { |
| 89 | + # Check if we were passed a db name |
| 90 | + $db = array_shift( $args ); |
| 91 | + list( $site, $lang ) = $conf->siteFromDB( $db ); |
91 | 92 | |
92 | | - # If not, work out the language and site the old way |
93 | | - if ( is_null( $site ) || is_null( $lang ) ) { |
94 | | - if ( !$db ) { |
95 | | - $lang = "aa"; |
96 | | - } else { |
97 | | - $lang = $db; |
| 93 | + # If not, work out the language and site the old way |
| 94 | + if ( is_null( $site ) || is_null( $lang ) ) { |
| 95 | + if ( !$db ) { |
| 96 | + $lang = "aa"; |
| 97 | + } else { |
| 98 | + $lang = $db; |
| 99 | + } |
| 100 | + if ( isset( $args[0] ) ) { |
| 101 | + $site = array_shift( $args ); |
| 102 | + } else { |
| 103 | + $site = "wikipedia"; |
| 104 | + } |
98 | 105 | } |
99 | | - if ( isset( $args[0] ) ) { |
100 | | - $site = array_shift( $args ); |
101 | | - } else { |
102 | | - $site = "wikipedia"; |
103 | | - } |
| 106 | + } else { |
| 107 | + $lang = "aa"; |
| 108 | + $site = "wikipedia"; |
104 | 109 | } |
105 | 110 | |
106 | 111 | # This is for the IRC scripts, which now run as the apache user |