|
|
@@ -28,12 +28,13 @@ class HestiaApp
|
|
|
$cli_arguments = '';
|
|
|
if (!empty($args) && is_array($args)) {
|
|
|
foreach ($args as $arg) {
|
|
|
+ var_dump($arg);
|
|
|
$cli_arguments .= quoteshellarg((string)$arg) . ' ';
|
|
|
}
|
|
|
} else {
|
|
|
$cli_arguments = quoteshellarg($args);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
exec($cli_script . ' ' . $cli_arguments . ' 2>&1', $output, $exit_code);
|
|
|
|
|
|
$result['code'] = $exit_code;
|
|
|
@@ -194,9 +195,13 @@ class HestiaApp
|
|
|
public function getCurrentBackendTemplate(string $domain){
|
|
|
$status = $this->runUser('v-list-web-domain', [$domain, 'json'],$return_message);
|
|
|
$version = $return_message -> json[$domain]['BACKEND'];
|
|
|
- $test= preg_match('/^.*PHP-([0-9])\_([0-9])/',$version, $match);
|
|
|
- return $match[1].'.'.$match[2];
|
|
|
-
|
|
|
+ if($version != "default"){
|
|
|
+ $test= preg_match('/^.*PHP-([0-9])\_([0-9])/',$version, $match);
|
|
|
+ return $match[1].'.'.$match[2];
|
|
|
+ }else{
|
|
|
+ $supported = $this -> run('v-list-sys-php', 'json', $result);
|
|
|
+ return $this -> $supported -> json[0];
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
public function changeWebTemplate(string $domain, string $template)
|