Destination Select - Dynamic: Clear session array on add/toggle/delete of a destination type record.

This commit is contained in:
fusionate
2020-11-30 14:15:57 -07:00
parent f6334ad9d0
commit c67c8cd4c2
30 changed files with 215 additions and 9 deletions
+10
View File
@@ -174,6 +174,11 @@
$cache = new cache;
$cache->delete("languages:".$phrase_language.".".$phrase_uuid);
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//send a redirect
message::add($text['message-add']);
header("Location: phrase_edit.php?id=".$phrase_uuid);
@@ -240,6 +245,11 @@
$cache = new cache;
$cache->delete("languages:".$phrase_language.".".$phrase_uuid);
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//send a redirect
message::add($text['message-update']);
header("Location: phrase_edit.php?id=".$phrase_uuid);
+3 -3
View File
@@ -54,21 +54,21 @@
if (permission_exists('phrase_add')) {
$obj = new phrases;
$obj->copy($phrases);
save_phrases_xml();
//save_phrases_xml();
}
break;
case 'toggle':
if (permission_exists('phrase_edit')) {
$obj = new phrases;
$obj->toggle($phrases);
save_phrases_xml();
//save_phrases_xml();
}
break;
case 'delete':
if (permission_exists('phrase_delete')) {
$obj = new phrases;
$obj->delete($phrases);
save_phrases_xml();
//save_phrases_xml();
}
break;
}
+10
View File
@@ -152,6 +152,11 @@ if (!class_exists('phrases')) {
$cache->delete("languages:".$phrase_language);
}
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//set message
message::add($text['message-delete']);
}
@@ -302,6 +307,11 @@ if (!class_exists('phrases')) {
$cache->delete("languages:".$phrase_language);
}
//clear the destinations session array
if (isset($_SESSION['destinations']['array'])) {
unset($_SESSION['destinations']['array']);
}
//set message
message::add($text['message-toggle']);
}