diff options
Diffstat (limited to 'includes/installer/CliInstaller.php')
-rw-r--r-- | includes/installer/CliInstaller.php | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/includes/installer/CliInstaller.php b/includes/installer/CliInstaller.php index 9e8fb2c5..2ae9d143 100644 --- a/includes/installer/CliInstaller.php +++ b/includes/installer/CliInstaller.php @@ -13,6 +13,7 @@ * @since 1.17 */ class CliInstaller extends Installer { + private $specifiedScriptPath = false; private $optionMap = array( 'dbtype' => 'wgDBtype', @@ -45,6 +46,10 @@ class CliInstaller extends Installer { parent::__construct(); + if ( isset( $option['scriptpath'] ) ) { + $this->specifiedScriptPath = true; + } + foreach ( $this->optionMap as $opt => $global ) { if ( isset( $option[$opt] ) ) { $GLOBALS[$global] = $option[$opt]; @@ -81,7 +86,7 @@ class CliInstaller extends Installer { $this->setVar( '_InstallUser', $option['installdbuser'] ); $this->setVar( '_InstallPassword', - $option['installdbpass'] ); + isset( $option['installdbpass'] ) ? $option['installdbpass'] : "" ); } if ( isset( $option['pass'] ) ) { @@ -136,6 +141,8 @@ class CliInstaller extends Installer { } /** + * @param $params array + * * @return string */ protected function getMessageText( $params ) { @@ -168,4 +175,16 @@ class CliInstaller extends Installer { exit; } } + + public function envCheckPath( ) { + if ( !$this->specifiedScriptPath ) { + $this->showMessage( 'config-no-cli-uri', $this->getVar("wgScriptPath") ); + } + return parent::envCheckPath(); + } + + public function dirIsExecutable( $dir, $url ) { + $this->showMessage( 'config-no-cli-uploads-check', $dir ); + return false; + } } |