Added php-selector support

This commit is contained in:
Alexey Berezhok
2024-08-27 23:35:17 +03:00
parent cce8d44f91
commit 3a964e54b1
7 changed files with 153 additions and 28 deletions

View File

@@ -108,6 +108,12 @@ $v_php_versions = array_map(function ($php_version) use ($backend_templates, $ba
return $phpinfo;
}, $v_php_versions);
if (!empty($_SESSION["PHP_SELECTOR"])) {
$v_php_selector = $_SESSION["PHP_SELECTOR"];
} else {
$v_php_selector = "";
}
// List languages
exec(HESTIA_CMD . "v-list-sys-languages json", $output, $return_var);
$language = json_decode(implode("", $output), true);
@@ -363,6 +369,23 @@ if (!empty($_POST["save"])) {
//force reload
$require_refresh = true;
}
//Check php selector
$t_v_php_selector = $_POST["v_use_php_selector"] == "on"?"yes":"no";
if ($_POST["v_use_php_selector"] != $v_php_selector){
$v_set_flag = "no";
if ($_POST["v_use_php_selector"] == "on"){
$v_set_flag = "yes";
}
exec(
HESTIA_CMD .
"v-change-selector-state " .
$v_set_flag,
$output,
$return_var,
);
check_return_code($return_var, $output);
unset($output);
}
}
}