Domain Settings: Ensure redirect if none checked on copy/toggle/delete.
This commit is contained in:
parent
b8e8e61126
commit
8a1b4f4fa2
|
|
@ -54,7 +54,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
//copy (to a different domain)
|
//copy (to a different domain)
|
||||||
if ($action == 'copy' && permission_exists('domain_select') && count($_SESSION['domains']) > 1) {
|
if ($action == 'copy') {
|
||||||
|
if (permission_exists('domain_select') && count($_SESSION['domains']) > 1) {
|
||||||
$target_domain_uuid = $_POST["target_domain_uuid"];
|
$target_domain_uuid = $_POST["target_domain_uuid"];
|
||||||
|
|
||||||
if (is_uuid($target_domain_uuid) && is_array($domain_setting_uuids) && @sizeof($domain_setting_uuids) > 0) {
|
if (is_uuid($target_domain_uuid) && is_array($domain_setting_uuids) && @sizeof($domain_setting_uuids) > 0) {
|
||||||
|
|
@ -142,6 +143,7 @@
|
||||||
// set message
|
// set message
|
||||||
message::add($text['message-copy'].": ".escape($settings_copied));
|
message::add($text['message-copy'].": ".escape($settings_copied));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
header("Location: ".PROJECT_PATH."/core/domains/domain_edit.php?id=".escape($_REQUEST["domain_uuid"]));
|
header("Location: ".PROJECT_PATH."/core/domains/domain_edit.php?id=".escape($_REQUEST["domain_uuid"]));
|
||||||
exit;
|
exit;
|
||||||
|
|
@ -149,7 +151,8 @@
|
||||||
|
|
||||||
//toggle
|
//toggle
|
||||||
$toggled = 0;
|
$toggled = 0;
|
||||||
if ($action == 'toggle' && is_array($domain_setting_uuids) && sizeof($domain_setting_uuids) > 0) {
|
if ($action == 'toggle') {
|
||||||
|
if (is_array($domain_setting_uuids) && sizeof($domain_setting_uuids) > 0) {
|
||||||
foreach ($domain_setting_uuids as $domain_setting_uuid) {
|
foreach ($domain_setting_uuids as $domain_setting_uuid) {
|
||||||
if (is_uuid($domain_setting_uuid)) {
|
if (is_uuid($domain_setting_uuid)) {
|
||||||
//get current status
|
//get current status
|
||||||
|
|
@ -175,13 +178,15 @@
|
||||||
if ($toggled > 0) {
|
if ($toggled > 0) {
|
||||||
message::add($text['message-toggle'].': '.$toggled);
|
message::add($text['message-toggle'].': '.$toggled);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
header("Location: ".PROJECT_PATH."/core/domains/domain_edit.php?id=".escape($_REQUEST["domain_uuid"]));
|
header("Location: ".PROJECT_PATH."/core/domains/domain_edit.php?id=".escape($_REQUEST["domain_uuid"]));
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
//delete
|
//delete
|
||||||
if ($action == 'delete' && permission_exists('domain_setting_delete')) {
|
if ($action == 'delete') {
|
||||||
|
if (permission_exists('domain_setting_delete')) {
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get();
|
$text = $language->get();
|
||||||
|
|
@ -205,6 +210,7 @@
|
||||||
unset($array);
|
unset($array);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
header("Location: ".PROJECT_PATH."/core/domains/domain_edit.php?id=".escape($_REQUEST["domain_uuid"]));
|
header("Location: ".PROJECT_PATH."/core/domains/domain_edit.php?id=".escape($_REQUEST["domain_uuid"]));
|
||||||
exit;
|
exit;
|
||||||
|
|
@ -280,9 +286,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
//show the content
|
//show the content
|
||||||
echo "<form name='domain_frm' id='domain_frm' method='post' action='".PROJECT_PATH."/core/domain_settings/domain_settings.php'>";
|
echo "<form name='domain_frm' id='domain_frm' method='post' action='".PROJECT_PATH."/core/domain_settings/domain_settings.php'>\n";
|
||||||
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
echo "<input type='hidden' name='".$token['name']."' value='".$token['hash']."'>\n";
|
||||||
echo "<input type='hidden' name='domain_uuid' value='".escape($domain_uuid)."'>";
|
echo "<input type='hidden' name='domain_uuid' value='".escape($domain_uuid)."'>\n";
|
||||||
|
|
||||||
echo "<div style='float: right;'>\n";
|
echo "<div style='float: right;'>\n";
|
||||||
if (permission_exists('domain_setting_add')) {
|
if (permission_exists('domain_setting_add')) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue