Quellcode durchsuchen

Fix multiple small issues with quick installer

Jaap Marcus vor 3 Jahren
Ursprung
Commit
9304fa35fc

+ 2 - 2
web/src/app/WebApp/Installers/Drupal/DrupalSetup.php

@@ -52,9 +52,9 @@ class DrupalSetup extends BaseSetup {
         $tmp_configpath = $this->saveTempFile($htaccess_rewrite);
         $this->appcontext->runUser('v-move-fs-file',[$tmp_configpath, $this->getDocRoot(".htaccess")], $result);
         
-        $php_version = $this -> appcontext -> getSupportedPHP($this -> config['server']['php']['supported']);
+       
         $this -> appcontext -> runUser('v-run-cli-cmd', [
-            "/usr/bin/php$php_version",
+            "/usr/bin/php".$options['php_version'],
             $this -> getDocRoot('/vendor/drush/drush/drush'), 
             'site-install',
             'standard',

+ 3 - 3
web/src/app/WebApp/Installers/Grav/GravSetup.php

@@ -45,12 +45,12 @@ class GravSetup extends BaseSetup {
 			
 		if ( $options['admin'] == true ){
 			chdir($this->getDocRoot());
-			$php_version = $this -> appcontext -> getSupportedPHP($this -> config['server']['php']['supported']);
-			$this -> appcontext -> runUser('v-run-cli-cmd', ["/usr/bin/php$php_version", 
+			
+			$this -> appcontext -> runUser('v-run-cli-cmd', ["/usr/bin/php".$options['php_version'], 
 			$this->getDocRoot('/bin/gpm'),
 				'install admin'
 		    ], $status);
-			$this -> appcontext -> runUser('v-run-cli-cmd', ["/usr/bin/php$php_version", 
+			$this -> appcontext -> runUser('v-run-cli-cmd', ["/usr/bin/php".$options['php_version'], 
 				$this->getDocRoot('/bin/plugin'),
 				'login new-user',
 				'-u '.$options['username'],

+ 2 - 2
web/src/app/WebApp/Installers/MediaWiki/MediaWikiSetup.php

@@ -58,8 +58,8 @@ class MediaWikiSetup extends BaseSetup
         $this->appcontext->runUser('v-copy-fs-directory', [
             $this->getDocRoot($this->extractsubdir . "/mediawiki-1.37.2/."),
             $this->getDocRoot()], $result);
-        $php_version = $this -> appcontext -> getSupportedPHP($this -> config['server']['php']['supported']);
-        $this->appcontext->runUser('v-run-cli-cmd', ["/usr/bin/php$php_version",
+
+        $this->appcontext->runUser('v-run-cli-cmd', ["/usr/bin/php".$options['php_version'],
             $this->getDocRoot('maintenance/install.php'),
             '--dbserver=localhost',
             '--dbname=' . $this->appcontext->user() . '_' . $options['database_name'],

+ 3 - 2
web/src/app/WebApp/Installers/Nextcloud/NextcloudSetup.php

@@ -42,7 +42,8 @@ class NextcloudSetup extends BaseSetup
         
         // install nextcloud
         $php_version = $this -> appcontext -> getSupportedPHP($this -> config['server']['php']['supported']);
-        $this->appcontext->runUser('v-run-cli-cmd', ["/usr/bin/php$php_version",
+    
+        $this->appcontext->runUser('v-run-cli-cmd', ["/usr/bin/php".$options['php_version'],
             $this->getDocRoot('occ'),
             'maintenance:install',
             '--database mysql',
@@ -55,7 +56,7 @@ class NextcloudSetup extends BaseSetup
 
         $this->appcontext->runUser(
             'v-run-cli-cmd',
-            ['/usr/bin/php',
+            ["/usr/bin/php".$options['php_version'],
                 $this->getDocRoot('occ'),
                 'config:system:set',
                 'trusted_domains 2 --value='.$this->domain

+ 1 - 2
web/src/app/WebApp/Installers/Opencart/OpencartSetup.php

@@ -61,10 +61,9 @@ class OpencartSetup extends BaseSetup
             $protocol = 'https://';
         }
         
-        $php_version = $this -> appcontext -> getSupportedPHP($this -> config['server']['php']['supported']);
         
         $this->appcontext->runUser('v-run-cli-cmd', [
-            "/usr/bin/php$php_version",
+           "/usr/bin/php".$options['php_version'],
             $this->getDocRoot("/install/cli_install.php"),
             "install",
             "--db_username " . $this->appcontext->user() . '_' .$options['database_user'],

+ 1 - 1
web/src/app/WebApp/Installers/Prestashop/PrestashopSetup.php

@@ -61,7 +61,7 @@ class PrestashopSetup extends BaseSetup
         $php_version = $this -> appcontext -> getSupportedPHP($this -> config['server']['php']['supported']);
         
         $this->appcontext->runUser('v-run-cli-cmd', [
-            "/usr/bin/php$php_version",
+            "/usr/bin/php".$options['php_version'],
             $this->getDocRoot("/install/index_cli.php"),
             "--db_user=" . $this->appcontext->user() . '_' .$options['database_user'],
             "--db_password=" . $options['database_password'],

+ 1 - 2
web/src/app/WebApp/Installers/Wordpress/WordpressSetup.php

@@ -119,10 +119,9 @@ class WordpressSetup extends BaseSetup
             . "&admin_email="    . rawurlencode($options['wordpress_account_email'])
             ), $output, $return_var);
         
-        if ( strpos(implode(PHP_EOL,$output),'Error establishing a database connection' !== false)){
+        if ( strpos(implode(PHP_EOL,$output),'Error establishing a database connection') !== false){
            throw new \Exception('Error establishing a database connection'); 
         }
-
         if ($return_var > 0) {
             throw new \Exception(implode(PHP_EOL, $output));
         }