|
@@ -33,6 +33,7 @@ unset($output);
|
|
|
|
|
|
|
|
// Parse package
|
|
// Parse package
|
|
|
$v_package = $_GET['package'];
|
|
$v_package = $_GET['package'];
|
|
|
|
|
+$v_package_new = $_GET['package'];
|
|
|
$v_web_template = $data[$v_package]['WEB_TEMPLATE'];
|
|
$v_web_template = $data[$v_package]['WEB_TEMPLATE'];
|
|
|
$v_backend_template = $data[$v_package]['BACKEND_TEMPLATE'];
|
|
$v_backend_template = $data[$v_package]['BACKEND_TEMPLATE'];
|
|
|
$v_proxy_template = $data[$v_package]['PROXY_TEMPLATE'];
|
|
$v_proxy_template = $data[$v_package]['PROXY_TEMPLATE'];
|
|
@@ -104,6 +105,7 @@ if (!empty($_POST['save'])) {
|
|
|
|
|
|
|
|
// Check empty fields
|
|
// Check empty fields
|
|
|
if (empty($_POST['v_package'])) $errors[] = _('package');
|
|
if (empty($_POST['v_package'])) $errors[] = _('package');
|
|
|
|
|
+ if (empty($_POST['v_package_new'])) $errors[] = _('package_new');
|
|
|
if (empty($_POST['v_web_template'])) $errors[] = _('web template');
|
|
if (empty($_POST['v_web_template'])) $errors[] = _('web template');
|
|
|
if (!empty($_SESSION['WEB_BACKEND'])) {
|
|
if (!empty($_SESSION['WEB_BACKEND'])) {
|
|
|
if (empty($_POST['v_backend_template'])) $errors[] = _('backend template');
|
|
if (empty($_POST['v_backend_template'])) $errors[] = _('backend template');
|
|
@@ -144,6 +146,7 @@ if (!empty($_POST['save'])) {
|
|
|
|
|
|
|
|
// Protect input
|
|
// Protect input
|
|
|
$v_package = escapeshellarg($_POST['v_package']);
|
|
$v_package = escapeshellarg($_POST['v_package']);
|
|
|
|
|
+ $v_package_new = escapeshellarg($_POST['v_package_new']);
|
|
|
$v_web_template = escapeshellarg($_POST['v_web_template']);
|
|
$v_web_template = escapeshellarg($_POST['v_web_template']);
|
|
|
if (!empty($_SESSION['WEB_BACKEND'])) {
|
|
if (!empty($_SESSION['WEB_BACKEND'])) {
|
|
|
$v_backend_template = escapeshellarg($_POST['v_backend_template']);
|
|
$v_backend_template = escapeshellarg($_POST['v_backend_template']);
|
|
@@ -225,7 +228,12 @@ if (!empty($_POST['save'])) {
|
|
|
exec (HESTIA_CMD."v-update-user-package ".$v_package." 'json'", $output, $return_var);
|
|
exec (HESTIA_CMD."v-update-user-package ".$v_package." 'json'", $output, $return_var);
|
|
|
check_return_code($return_var,$output);
|
|
check_return_code($return_var,$output);
|
|
|
unset($output);
|
|
unset($output);
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ if($v_package_new != $v_package){
|
|
|
|
|
+ exec (HESTIA_CMD."v-rename-user-package " . $v_package . " " . $v_package_new, $output, $return_var);
|
|
|
|
|
+ check_return_code($return_var,$output);
|
|
|
|
|
+ unset($output);
|
|
|
|
|
+ }
|
|
|
// Set success message
|
|
// Set success message
|
|
|
if (empty($_SESSION['error_msg'])) {
|
|
if (empty($_SESSION['error_msg'])) {
|
|
|
$_SESSION['ok_msg'] = _('Changes has been saved.');
|
|
$_SESSION['ok_msg'] = _('Changes has been saved.');
|