Destination Select - Dynamic: Clear session array on add/toggle/delete of a destination type record.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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']);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user