diff --git a/app/access_controls/access_control_delete.php b/app/access_controls/access_control_delete.php index 50b5b28930..79f04285e5 100644 --- a/app/access_controls/access_control_delete.php +++ b/app/access_controls/access_control_delete.php @@ -44,7 +44,7 @@ } //redirect the user - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); header('Location: access_controls.php'); diff --git a/app/access_controls/access_control_node_delete.php b/app/access_controls/access_control_node_delete.php index fec0b9bd20..90c72ed9bd 100644 --- a/app/access_controls/access_control_node_delete.php +++ b/app/access_controls/access_control_node_delete.php @@ -31,7 +31,7 @@ else { } //redirect the user - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); header('Location: access_control_edit.php?id='.$access_control_uuid); ?> \ No newline at end of file diff --git a/app/access_controls/access_control_node_edit.php b/app/access_controls/access_control_node_edit.php index e674316af7..d124e490a3 100644 --- a/app/access_controls/access_control_node_edit.php +++ b/app/access_controls/access_control_node_edit.php @@ -86,7 +86,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { unset($sql); remove_config_from_cache('configuration:acl.conf'); - $_SESSION['message'] = $text['message-add']; + messages::add($text['message-add']); header('Location: access_control_edit.php?id='.$access_control_uuid); return; @@ -104,7 +104,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { unset($sql); remove_config_from_cache('configuration:acl.conf'); - $_SESSION['message'] = $text['message-update']; + messages::add($text['message-update']); header('Location: access_control_edit.php?id='.$access_control_uuid); return; diff --git a/app/call_broadcast/call_broadcast_stop.php b/app/call_broadcast/call_broadcast_stop.php index ab8a4dafbb..3737729236 100644 --- a/app/call_broadcast/call_broadcast_stop.php +++ b/app/call_broadcast/call_broadcast_stop.php @@ -52,7 +52,7 @@ else { if ($fp) { $cmd = "sched_del ".$uuid; $result = event_socket_request($fp, 'api '.$cmd); - $_SESSION['message'] = htmlentities($result); + messages::add(htmlentities($result)); } } diff --git a/app/call_centers/call_center_queue_edit.php b/app/call_centers/call_center_queue_edit.php index 4849a05fff..6d6966a74e 100644 --- a/app/call_centers/call_center_queue_edit.php +++ b/app/call_centers/call_center_queue_edit.php @@ -65,8 +65,7 @@ } unset($prep_statement, $row); if ($total_call_center_queues >= $_SESSION['limit']['call_center_queues']['numeric']) { - $_SESSION['message_mood'] = 'negative'; - $_SESSION['message'] = $text['message-maximum_queues'].' '.$_SESSION['limit']['call_center_queues']['numeric']; + messages::add($text['message-maximum_queues'].' '.$_SESSION['limit']['call_center_queues']['numeric'], 'negative'); header('Location: call_center_queues.php'); return; } diff --git a/app/conference_controls/conference_control_delete.php b/app/conference_controls/conference_control_delete.php index 89b49b7517..bc176015d6 100644 --- a/app/conference_controls/conference_control_delete.php +++ b/app/conference_controls/conference_control_delete.php @@ -43,7 +43,7 @@ } //redirect the user - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); header('Location: conference_controls.php'); ?> \ No newline at end of file diff --git a/app/conference_controls/conference_control_detail_delete.php b/app/conference_controls/conference_control_detail_delete.php index ccd36d3283..443cd6403f 100644 --- a/app/conference_controls/conference_control_detail_delete.php +++ b/app/conference_controls/conference_control_detail_delete.php @@ -36,7 +36,7 @@ } //redirect the user - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); header('Location: conference_control_detail_edit.php?id='.$conference_control_uuid); ?> \ No newline at end of file diff --git a/app/conference_profiles/conference_profile_delete.php b/app/conference_profiles/conference_profile_delete.php index 0980bac9b7..d192cb0c5a 100644 --- a/app/conference_profiles/conference_profile_delete.php +++ b/app/conference_profiles/conference_profile_delete.php @@ -43,7 +43,7 @@ } //redirect the user - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); header('Location: conference_profiles.php'); ?> diff --git a/app/conference_profiles/conference_profile_param_delete.php b/app/conference_profiles/conference_profile_param_delete.php index 6184bbbf46..0027df1948 100644 --- a/app/conference_profiles/conference_profile_param_delete.php +++ b/app/conference_profiles/conference_profile_param_delete.php @@ -36,7 +36,7 @@ } //redirect the user - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); header('Location: conference_profile_param_edit.php?id='.$conference_profile_uuid); ?> diff --git a/app/contacts/contact_auth.php b/app/contacts/contact_auth.php index d2410d12a6..43e1fe2520 100644 --- a/app/contacts/contact_auth.php +++ b/app/contacts/contact_auth.php @@ -52,8 +52,7 @@ $_SESSION['contact_auth']['target'] = ($_SESSION['contact_auth']['target'] == '' if ($_SESSION['contact_auth']['source'] == 'google') { if ($_REQUEST['error']) { - $_SESSION['message'] = ($text['message-'.$_REQUEST['error']] != '') ? $text['message-'.$_REQUEST['error']] : $_REQUEST['error']; - $_SESSION['message_mood'] = 'negative'; + messages::add(($text['message-'.$_REQUEST['error']] != '') ? $text['message-'.$_REQUEST['error']] : $_REQUEST['error'], 'negative'); header("Location: ".$_SESSION['contact_auth']['referer']); unset($_SESSION['contact_auth']); exit; @@ -61,7 +60,7 @@ if ($_SESSION['contact_auth']['source'] == 'google') { if (isset($_REQUEST['signout'])) { unset($_SESSION['contact_auth']['token']); - $_SESSION['message'] = $text['message-google_signed_out']; + messages::add($text['message-google_signed_out']); header("Location: https://www.google.com/accounts/Logout?continue=https://appengine.google.com/_ah/logout?continue=".(($_SERVER["HTTPS"] == "on") ? "https" : "http")."://".$_SERVER['HTTP_HOST'].PROJECT_PATH."/app/contacts/".$_SESSION['contact_auth']['referer']); exit; } @@ -111,9 +110,7 @@ if ($_SESSION['contact_auth']['source'] == 'google') { } else { - - $_SESSION['message'] = $text['message-access_denied']; - $_SESSION['message_mood'] = 'negative'; + messages::add($text['message-access_denied'], 'negative'); header("Location: ".$_SESSION['contact_auth']['referer']); unset($_SESSION['contact_auth']); exit; diff --git a/app/database_transactions/database_transaction_delete.php b/app/database_transactions/database_transaction_delete.php index c5f70090af..4cc45041e7 100644 --- a/app/database_transactions/database_transaction_delete.php +++ b/app/database_transactions/database_transaction_delete.php @@ -58,7 +58,7 @@ } //redirect the user - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); header('Location: database_transactions.php'); ?> \ No newline at end of file diff --git a/app/destinations/destination_edit.php b/app/destinations/destination_edit.php index 6c700c55b3..7cdca3e9ba 100644 --- a/app/destinations/destination_edit.php +++ b/app/destinations/destination_edit.php @@ -64,8 +64,7 @@ } unset($prep_statement, $row); if ($total_destinations >= $_SESSION['limit']['destinations']['numeric']) { - $_SESSION['message_mood'] = 'negative'; - $_SESSION['message'] = $text['message-maximum_destinations'].' '.$_SESSION['limit']['destinations']['numeric']; + messages::add($text['message-maximum_destinations'].' '.$_SESSION['limit']['destinations']['numeric'], 'negative'); header('Location: destinations.php'); return; } diff --git a/app/devices/cmd.php b/app/devices/cmd.php index f40d857e83..dd8958bf09 100644 --- a/app/devices/cmd.php +++ b/app/devices/cmd.php @@ -67,7 +67,7 @@ else { $response = event_socket_request($fp, "api log notice ".$command); //show the response - $_SESSION['message'] = $text['label-event']." ".ucwords($cmd)."     ".$text['label-response'].$response; + messages::add($text['label-event']." ".ucwords($cmd)."     ".$text['label-response'].htmlentities($response)); //close the connection fclose($fp); diff --git a/app/devices/device_copy.php b/app/devices/device_copy.php index 15e166e652..fb2197db80 100644 --- a/app/devices/device_copy.php +++ b/app/devices/device_copy.php @@ -68,7 +68,7 @@ } else { $save = false; - $_SESSION['message'] = $text['message-duplicate']; + messages::add($text['message-duplicate']); } } unset($prep_statement); diff --git a/app/devices/device_edit.php b/app/devices/device_edit.php index 92dad7b91f..3ae67212b2 100644 --- a/app/devices/device_edit.php +++ b/app/devices/device_edit.php @@ -120,8 +120,7 @@ } unset($prep_statement, $row); if ($total_devices >= $_SESSION['limit']['devices']['numeric']) { - $_SESSION['message_mood'] = 'negative'; - $_SESSION['message'] = $text['message-maximum_devices'].' '.$_SESSION['limit']['devices']['numeric']; + messages::add($text['message-maximum_devices'].' '.$_SESSION['limit']['devices']['numeric'], 'negative'); header('Location: devices.php'); return; } @@ -326,11 +325,11 @@ if ($save) { if ($action == "add") { //save the message to a session variable - $_SESSION['message'] = $text['message-add']; + messages::add($text['message-add']); } if ($action == "update") { //save the message to a session variable - $_SESSION['message'] = $text['message-update']; + messages::add($text['message-update']); } //redirect the browser header("Location: device_edit.php?id=$device_uuid"); diff --git a/app/devices/device_profile_edit.php b/app/devices/device_profile_edit.php index f99a6dde24..da50a3c87b 100644 --- a/app/devices/device_profile_edit.php +++ b/app/devices/device_profile_edit.php @@ -177,11 +177,11 @@ if ($save) { if ($action == "add") { //save the message to a session variable - $_SESSION['message'] = $text['message-add']; + messages::add($text['message-add']); } if ($action == "update") { //save the message to a session variable - $_SESSION['message'] = $text['message-update']; + messages::add($text['message-update']); } //redirect the browser diff --git a/app/devices/device_vendor_delete.php b/app/devices/device_vendor_delete.php index e155dd48c6..fed2d0b488 100644 --- a/app/devices/device_vendor_delete.php +++ b/app/devices/device_vendor_delete.php @@ -58,7 +58,7 @@ } //redirect the user - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); header('Location: device_vendors.php'); ?> \ No newline at end of file diff --git a/app/devices/device_vendor_function_delete.php b/app/devices/device_vendor_function_delete.php index c2ebe159cb..f7c4abda16 100644 --- a/app/devices/device_vendor_function_delete.php +++ b/app/devices/device_vendor_function_delete.php @@ -59,7 +59,7 @@ } //redirect the user - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); header('Location: device_vendor_function_edit.php?id='.$device_vendor_uuid); ?> \ No newline at end of file diff --git a/app/devices/device_vendor_restore.php b/app/devices/device_vendor_restore.php index a7d53d10e1..87f9d6e0ed 100644 --- a/app/devices/device_vendor_restore.php +++ b/app/devices/device_vendor_restore.php @@ -159,7 +159,7 @@ } //if num_rows } // if prep_statement - $_SESSION['message'] = $text['message-restore']; + messages::add($text['message-restore']); header('Location: device_vendors.php'); ?> diff --git a/app/dialplan/dialplan_detail_delete.php b/app/dialplan/dialplan_detail_delete.php index cb11984fc6..5b35e41a96 100644 --- a/app/dialplan/dialplan_detail_delete.php +++ b/app/dialplan/dialplan_detail_delete.php @@ -81,7 +81,7 @@ } //save the message to a session variable - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); //redirect the browser header("Location: dialplan_edit.php?id=".$dialplan_uuid.(($app_uuid != '') ? "&app_uuid=".$app_uuid : null)); diff --git a/app/dialplan/dialplan_edit.php b/app/dialplan/dialplan_edit.php index 2cb86d7f1b..6bfeef73f9 100644 --- a/app/dialplan/dialplan_edit.php +++ b/app/dialplan/dialplan_edit.php @@ -196,10 +196,10 @@ //set the message if ($action == "add") { - $_SESSION['message'] = $text['message-add']; + messages::add($text['message-add']); } else if ($action == "update") { - $_SESSION['message'] = $text['message-update']; + messages::add($text['message-update']); } header("Location: ?id=".$dialplan_uuid.(($app_uuid != '') ? "&app_uuid=".$app_uuid : null)); exit; diff --git a/app/dialplan/dialplan_xml.php b/app/dialplan/dialplan_xml.php index e64ce8cf87..e311fbaf12 100644 --- a/app/dialplan/dialplan_xml.php +++ b/app/dialplan/dialplan_xml.php @@ -104,7 +104,7 @@ $cache->delete("dialplan:".$dialplan_context); //save the message to a session variable - $_SESSION['message'] = $text['message-update']; + messages::add($text['message-update']); //redirect the user header("Location: dialplan_edit.php?id=".$dialplan_uuid."&".((strlen($app_uuid) > 0) ? "?app_uuid=".$app_uuid : null)); diff --git a/app/extensions/extension_edit.php b/app/extensions/extension_edit.php index a5bf4ebc77..cc8f36f249 100644 --- a/app/extensions/extension_edit.php +++ b/app/extensions/extension_edit.php @@ -63,8 +63,7 @@ } unset($prep_statement, $row); if ($total_extensions >= $_SESSION['limit']['extensions']['numeric']) { - $_SESSION['message_mood'] = 'negative'; - $_SESSION['message'] = $text['message-maximum_extensions'].' '.$_SESSION['limit']['extensions']['numeric']; + messages::add($text['message-maximum_extensions'].' '.$_SESSION['limit']['extensions']['numeric'], 'negative'); header('Location: extensions.php'); return; } diff --git a/app/fax/fax_file_delete.php b/app/fax/fax_file_delete.php index f888891ed5..e2781260cb 100644 --- a/app/fax/fax_file_delete.php +++ b/app/fax/fax_file_delete.php @@ -94,7 +94,7 @@ else { $prep_statement->execute(); unset($prep_statement); - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); } //redirect the user diff --git a/app/fax/fax_log_delete.php b/app/fax/fax_log_delete.php index 5922ce2b54..bf815ceb3e 100755 --- a/app/fax/fax_log_delete.php +++ b/app/fax/fax_log_delete.php @@ -31,7 +31,7 @@ if (strlen($id)>0) { } //redirect the user - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); header('Location: fax_logs.php?id='.$fax_uuid); ?> \ No newline at end of file diff --git a/app/gateways/gateway_edit.php b/app/gateways/gateway_edit.php index 3710e4e3c2..3a9ee26483 100644 --- a/app/gateways/gateway_edit.php +++ b/app/gateways/gateway_edit.php @@ -74,8 +74,7 @@ } unset($prep_statement, $row); if ($total_gateways >= $_SESSION['limit']['gateways']['numeric']) { - $_SESSION['message_mood'] = 'negative'; - $_SESSION['message'] = $text['message-maximum_gateways'].' '.$_SESSION['limit']['gateways']['numeric']; + messages::add($text['message-maximum_gateways'].' '.$_SESSION['limit']['gateways']['numeric'], 'negative'); header('Location: gateways.php'); return; } diff --git a/app/ivr_menus/ivr_menu_delete.php b/app/ivr_menus/ivr_menu_delete.php index 196535894a..365bf905b1 100644 --- a/app/ivr_menus/ivr_menu_delete.php +++ b/app/ivr_menus/ivr_menu_delete.php @@ -61,7 +61,7 @@ if (strlen($id) > 0) { } //redirect the user - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); header("Location: ivr_menus.php"); ?> \ No newline at end of file diff --git a/app/ivr_menus/ivr_menu_edit.php b/app/ivr_menus/ivr_menu_edit.php index 0cbcf7868e..8324a6f645 100644 --- a/app/ivr_menus/ivr_menu_edit.php +++ b/app/ivr_menus/ivr_menu_edit.php @@ -72,8 +72,7 @@ } unset($prep_statement, $row); if ($total_ivr_menus >= $_SESSION['limit']['ivr_menus']['numeric']) { - $_SESSION['message_mood'] = 'negative'; - $_SESSION['message'] = $text['message-maximum_ivr_menus'].' '.$_SESSION['limit']['ivr_menus']['numeric']; + messages::add($text['message-maximum_ivr_menus'].' '.$_SESSION['limit']['ivr_menus']['numeric'], 'negative'); header('Location: ivr_menus.php'); return; } @@ -304,12 +303,12 @@ //set the add message if ($action == "add" && permission_exists('ivr_menu_add')) { - $_SESSION['message'] = $text['message-add']; + messages::add($text['message-add']); } //set the update message if ($action == "update" && permission_exists('ivr_menu_edit')) { - $_SESSION['message'] = $text['message-update']; + messages::add($text['message-update']); } //redirect the user diff --git a/app/ivr_menus/ivr_menu_option_delete.php b/app/ivr_menus/ivr_menu_option_delete.php index b3d217909f..dcd33c6ba2 100644 --- a/app/ivr_menus/ivr_menu_option_delete.php +++ b/app/ivr_menus/ivr_menu_option_delete.php @@ -56,7 +56,7 @@ else { } //redirect the user - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); header('Location: ivr_menu_edit.php?id='.$ivr_menu_uuid); ?> \ No newline at end of file diff --git a/app/ivr_menus/resources/classes/ivr_menu.php b/app/ivr_menus/resources/classes/ivr_menu.php index 309327462b..55bf60f4d9 100644 --- a/app/ivr_menus/resources/classes/ivr_menu.php +++ b/app/ivr_menus/resources/classes/ivr_menu.php @@ -190,12 +190,12 @@ include "root.php"; //set the add message if ($action == "add" && permission_exists('ivr_menu_add')) { - $_SESSION['message'] = $text['message-add']; + messages::add($text['message-add']); } //set the update message if ($action == "update" && permission_exists('ivr_menu_edit')) { - $_SESSION['message'] = $text['message-update']; + messages::add($text['message-update']); } //return the result diff --git a/app/music_on_hold/music_on_hold.php b/app/music_on_hold/music_on_hold.php index 961a561516..6be7d91955 100644 --- a/app/music_on_hold/music_on_hold.php +++ b/app/music_on_hold/music_on_hold.php @@ -158,7 +158,7 @@ //process, if possible if (!$valid_file_type) { - $_SESSION['message'] = $text['message-unsupported_file_type']; + messages::add($text['message-unsupported_file_type']); } else { @@ -257,7 +257,7 @@ } //set message - $_SESSION['message'] = $text['message-upload_completed']; + messages::add($text['message-upload_completed']); } //require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php"; @@ -302,7 +302,7 @@ array_map('unlink', glob(path_join($stream_path, '*.ogg'))); } //set message - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); } //require_once "app/music_on_hold/resources/classes/switch_music_on_hold.php"; diff --git a/app/music_on_hold/music_on_hold_delete.php b/app/music_on_hold/music_on_hold_delete.php index ad8bfe4a30..50b6615413 100644 --- a/app/music_on_hold/music_on_hold_delete.php +++ b/app/music_on_hold/music_on_hold_delete.php @@ -57,7 +57,7 @@ } //redirect the user - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); header('Location: music_on_hold.php'); ?> diff --git a/app/phrases/phrase_detail_delete.php b/app/phrases/phrase_detail_delete.php index 6d558f260b..b5945ab8e5 100644 --- a/app/phrases/phrase_detail_delete.php +++ b/app/phrases/phrase_detail_delete.php @@ -66,7 +66,7 @@ else { } //redirect the user - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); header('Location: phrase_edit.php?id='.$phrase_uuid); ?> \ No newline at end of file diff --git a/app/pin_numbers/pin_number_delete.php b/app/pin_numbers/pin_number_delete.php index e5d5036c68..95efa1124e 100644 --- a/app/pin_numbers/pin_number_delete.php +++ b/app/pin_numbers/pin_number_delete.php @@ -59,7 +59,7 @@ } //redirect the user - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); header('Location: pin_numbers.php'); ?> \ No newline at end of file diff --git a/app/recordings/recordings.php b/app/recordings/recordings.php index 59a50e8e14..f64e4ca492 100644 --- a/app/recordings/recordings.php +++ b/app/recordings/recordings.php @@ -142,7 +142,7 @@ move_uploaded_file($_FILES['ulfile']['tmp_name'], $_SESSION['switch']['recordings']['dir'].'/'.$_SESSION['domain_name'].'/'.$recording_filename); //set the message - $_SESSION['message'] = $text['message-uploaded'].": ".htmlentities($recording_filename); + messages::add($text['message-uploaded'].": ".htmlentities($recording_filename)); //set the file name to be inserted as the recording description $recording_description = base64_encode($_FILES['ulfile']['name']); diff --git a/app/registrations/cmd.php b/app/registrations/cmd.php index 35dcbd99b9..e47551874d 100644 --- a/app/registrations/cmd.php +++ b/app/registrations/cmd.php @@ -66,7 +66,7 @@ else { $response = event_socket_request($fp, "api ".$command); $response = event_socket_request($fp, "api log notice ".$command); //show the response - $_SESSION['message'] = $text['label-event']." ".ucwords($cmd)."     ".$text['label-response'].$response; + messages::add($text['label-event']." ".ucwords($cmd)."     ".$text['label-response'].htmlentities($response)); //close the connection fclose($fp); } diff --git a/app/ring_groups/ring_group_destination_delete.php b/app/ring_groups/ring_group_destination_delete.php index 76cc72d6e1..688bec3b9d 100644 --- a/app/ring_groups/ring_group_destination_delete.php +++ b/app/ring_groups/ring_group_destination_delete.php @@ -55,7 +55,7 @@ else { } //save the message to a session variable - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); //redirect the browser header("Location: ring_group_edit.php?id=$ring_group_uuid"); diff --git a/app/ring_groups/ring_group_edit.php b/app/ring_groups/ring_group_edit.php index 612108dcf5..a3b1dc451c 100644 --- a/app/ring_groups/ring_group_edit.php +++ b/app/ring_groups/ring_group_edit.php @@ -57,7 +57,7 @@ $sql .= "and user_uuid = '".$user_uuid."' "; $db->exec(check_sql($sql)); //save the message to a session variable - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); //redirect the browser header("Location: ring_group_edit.php?id=$ring_group_uuid"); exit; @@ -84,8 +84,7 @@ } unset($prep_statement, $row); if ($total_ring_groups >= $_SESSION['limit']['ring_groups']['numeric']) { - $_SESSION['message_mood'] = 'negative'; - $_SESSION['message'] = $text['message-maximum_ring_groups'].' '.$_SESSION['limit']['ring_groups']['numeric']; + messages::add($text['message-maximum_ring_groups'].' '.$_SESSION['limit']['ring_groups']['numeric'], 'negative'); header('Location: ring_groups.php'); return; } @@ -149,7 +148,7 @@ $sql_insert .= ")"; $db->exec($sql_insert); //save the message to a session variable - $_SESSION['message'] = $text['message-add']; + messages::add($text['message-add']); //redirect the browser header("Location: ring_group_edit.php?id=$ring_group_uuid"); exit; @@ -337,14 +336,14 @@ //set the message if ($action == "add") { //save the message to a session variable - $_SESSION['message'] = $text['message-add']; + messages::add($text['message-add']); //redirect the browser header("Location: ring_group_edit.php?id=$ring_group_uuid"); exit; } if ($action == "update") { //save the message to a session variable - $_SESSION['message'] = $text['message-update']; + messages::add($text['message-update']); } } //(count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) diff --git a/app/sip_profiles/sip_profile_domain_delete.php b/app/sip_profiles/sip_profile_domain_delete.php index 0fa89dc016..13a7c2b5c4 100644 --- a/app/sip_profiles/sip_profile_domain_delete.php +++ b/app/sip_profiles/sip_profile_domain_delete.php @@ -70,7 +70,7 @@ } //redirect the user - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); header('Location: sip_profile_edit.php?id='.$sip_profile_uuid); ?> diff --git a/app/time_conditions/time_condition_edit.php b/app/time_conditions/time_condition_edit.php index 52009a830a..82aca8cbaa 100644 --- a/app/time_conditions/time_condition_edit.php +++ b/app/time_conditions/time_condition_edit.php @@ -527,10 +527,10 @@ //set the message if ($action == "add") { - $_SESSION['message'] = $text['message-add']; + messages::add($text['message-add']); } else if ($action == "update") { - $_SESSION['message'] = $text['message-update']; + messages::add($text['message-update']); } header("Location: time_condition_edit.php?id=".$dialplan_uuid.(($app_uuid != '') ? "&app_uuid=".$app_uuid : null)); return; diff --git a/app/voicemails/voicemail_option_delete.php b/app/voicemails/voicemail_option_delete.php index 8ca56c9a0f..cfc099191b 100644 --- a/app/voicemails/voicemail_option_delete.php +++ b/app/voicemails/voicemail_option_delete.php @@ -54,7 +54,7 @@ else { } //redirect the user - $_SESSION['message'] = $text['message-delete']; + messages::add($text['message-delete']); header('Location: voicemail_edit.php?id='.$voicemail_uuid); ?> \ No newline at end of file diff --git a/app/voicemails/voicemail_option_edit.php b/app/voicemails/voicemail_option_edit.php index cf5515149c..a4e03c8e6b 100644 --- a/app/voicemails/voicemail_option_edit.php +++ b/app/voicemails/voicemail_option_edit.php @@ -105,7 +105,7 @@ if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) { unset($sql); //redirect the user - $_SESSION['message'] = $text['message-update']; + messages::add($text['message-update']); header('Location: voicemail_edit.php?id='.$voicemail_uuid); return; }