Enhance - Convert more messages (#2646)

convert more messages to messages class
skipped dashboard messages due to them relying on $_SESSION['message']
to know if there has already been a change
This commit is contained in:
Mafoo
2017-06-08 16:39:04 +01:00
committed by FusionPBX
parent 76ab1cca6a
commit b7f4cba09c
42 changed files with 59 additions and 69 deletions

View File

@@ -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)