Skip to content

Commit 9304fa3

Browse files
committed
Fix multiple small issues with quick installer
1 parent a569392 commit 9304fa3

File tree

7 files changed

+13
-14
lines changed

7 files changed

+13
-14
lines changed

web/src/app/WebApp/Installers/Drupal/DrupalSetup.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ public function install(array $options=null) : bool
5252
$tmp_configpath = $this->saveTempFile($htaccess_rewrite);
5353
$this->appcontext->runUser('v-move-fs-file',[$tmp_configpath, $this->getDocRoot(".htaccess")], $result);
5454

55-
$php_version = $this -> appcontext -> getSupportedPHP($this -> config['server']['php']['supported']);
55+
5656
$this -> appcontext -> runUser('v-run-cli-cmd', [
57-
"/usr/bin/php$php_version",
57+
"/usr/bin/php".$options['php_version'],
5858
$this -> getDocRoot('/vendor/drush/drush/drush'),
5959
'site-install',
6060
'standard',

web/src/app/WebApp/Installers/Grav/GravSetup.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ public function install(array $options = null)
4545

4646
if ( $options['admin'] == true ){
4747
chdir($this->getDocRoot());
48-
$php_version = $this -> appcontext -> getSupportedPHP($this -> config['server']['php']['supported']);
49-
$this -> appcontext -> runUser('v-run-cli-cmd', ["/usr/bin/php$php_version",
48+
49+
$this -> appcontext -> runUser('v-run-cli-cmd', ["/usr/bin/php".$options['php_version'],
5050
$this->getDocRoot('/bin/gpm'),
5151
'install admin'
5252
], $status);
53-
$this -> appcontext -> runUser('v-run-cli-cmd', ["/usr/bin/php$php_version",
53+
$this -> appcontext -> runUser('v-run-cli-cmd', ["/usr/bin/php".$options['php_version'],
5454
$this->getDocRoot('/bin/plugin'),
5555
'login new-user',
5656
'-u '.$options['username'],

web/src/app/WebApp/Installers/MediaWiki/MediaWikiSetup.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public function install(array $options = null)
5858
$this->appcontext->runUser('v-copy-fs-directory', [
5959
$this->getDocRoot($this->extractsubdir . "/mediawiki-1.37.2/."),
6060
$this->getDocRoot()], $result);
61-
$php_version = $this -> appcontext -> getSupportedPHP($this -> config['server']['php']['supported']);
62-
$this->appcontext->runUser('v-run-cli-cmd', ["/usr/bin/php$php_version",
61+
62+
$this->appcontext->runUser('v-run-cli-cmd', ["/usr/bin/php".$options['php_version'],
6363
$this->getDocRoot('maintenance/install.php'),
6464
'--dbserver=localhost',
6565
'--dbname=' . $this->appcontext->user() . '_' . $options['database_name'],

web/src/app/WebApp/Installers/Nextcloud/NextcloudSetup.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public function install(array $options = null): bool
4242

4343
// install nextcloud
4444
$php_version = $this -> appcontext -> getSupportedPHP($this -> config['server']['php']['supported']);
45-
$this->appcontext->runUser('v-run-cli-cmd', ["/usr/bin/php$php_version",
45+
46+
$this->appcontext->runUser('v-run-cli-cmd', ["/usr/bin/php".$options['php_version'],
4647
$this->getDocRoot('occ'),
4748
'maintenance:install',
4849
'--database mysql',
@@ -55,7 +56,7 @@ public function install(array $options = null): bool
5556

5657
$this->appcontext->runUser(
5758
'v-run-cli-cmd',
58-
['/usr/bin/php',
59+
["/usr/bin/php".$options['php_version'],
5960
$this->getDocRoot('occ'),
6061
'config:system:set',
6162
'trusted_domains 2 --value='.$this->domain

web/src/app/WebApp/Installers/Opencart/OpencartSetup.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,9 @@ public function install(array $options = null): bool
6161
$protocol = 'https://';
6262
}
6363

64-
$php_version = $this -> appcontext -> getSupportedPHP($this -> config['server']['php']['supported']);
6564

6665
$this->appcontext->runUser('v-run-cli-cmd', [
67-
"/usr/bin/php$php_version",
66+
"/usr/bin/php".$options['php_version'],
6867
$this->getDocRoot("/install/cli_install.php"),
6968
"install",
7069
"--db_username " . $this->appcontext->user() . '_' .$options['database_user'],

web/src/app/WebApp/Installers/Prestashop/PrestashopSetup.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function install(array $options=null): bool
6161
$php_version = $this -> appcontext -> getSupportedPHP($this -> config['server']['php']['supported']);
6262

6363
$this->appcontext->runUser('v-run-cli-cmd', [
64-
"/usr/bin/php$php_version",
64+
"/usr/bin/php".$options['php_version'],
6565
$this->getDocRoot("/install/index_cli.php"),
6666
"--db_user=" . $this->appcontext->user() . '_' .$options['database_user'],
6767
"--db_password=" . $options['database_password'],

web/src/app/WebApp/Installers/Wordpress/WordpressSetup.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,9 @@ public function install(array $options = null)
119119
. "&admin_email=" . rawurlencode($options['wordpress_account_email'])
120120
), $output, $return_var);
121121

122-
if ( strpos(implode(PHP_EOL,$output),'Error establishing a database connection' !== false)){
122+
if ( strpos(implode(PHP_EOL,$output),'Error establishing a database connection') !== false){
123123
throw new \Exception('Error establishing a database connection');
124124
}
125-
126125
if ($return_var > 0) {
127126
throw new \Exception(implode(PHP_EOL, $output));
128127
}

0 commit comments

Comments
 (0)