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

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