From 9f6b80857f047fb4e55f2bcb8c09f3285e7db1ab Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Fri, 24 Jun 2005 21:42:00 +0000 Subject: [PATCH] added $wgNoDBParam option --- maintenance/commandLine.inc | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/maintenance/commandLine.inc b/maintenance/commandLine.inc index 3e308ab38e..6c6b3d483c 100644 --- a/maintenance/commandLine.inc +++ b/maintenance/commandLine.inc @@ -84,22 +84,27 @@ if ( $sep == ":" && strpos( `hostname`, "wikimedia.org" ) !== false ) { # Get $conf require( "$IP/InitialiseSettings.php" ); - # Check if we were passed a db name - $db = array_shift( $args ); - list( $site, $lang ) = $conf->siteFromDB( $db ); - - # If not, work out the language and site the old way - if ( is_null( $site ) || is_null( $lang ) ) { - if ( !$db ) { - $lang = "aa"; - } else { - $lang = $db; - } - if ( isset( $args[0] ) ) { - $site = array_shift( $args ); - } else { - $site = "wikipedia"; + if ( empty( $wgNoDBParam ) ) { + # Check if we were passed a db name + $db = array_shift( $args ); + list( $site, $lang ) = $conf->siteFromDB( $db ); + + # If not, work out the language and site the old way + if ( is_null( $site ) || is_null( $lang ) ) { + if ( !$db ) { + $lang = "aa"; + } else { + $lang = $db; + } + if ( isset( $args[0] ) ) { + $site = array_shift( $args ); + } else { + $site = "wikipedia"; + } } + } else { + $lang = "aa"; + $site = "wikipedia"; } # This is for the IRC scripts, which now run as the apache user -- 2.20.1