Voicemails: Database class integration.
This commit is contained in:
@@ -47,14 +47,16 @@ else {
|
||||
require_once "resources/classes/voicemail.php";
|
||||
foreach ($voicemail_messages as $voicemail_uuid => $voicemail_message_uuids) {
|
||||
foreach ($voicemail_message_uuids as $voicemail_message_uuid) {
|
||||
$voicemail = new voicemail;
|
||||
$voicemail->db = $db;
|
||||
$voicemail->domain_uuid = $_SESSION['domain_uuid'];
|
||||
$voicemail->voicemail_uuid = check_str($voicemail_uuid);
|
||||
$voicemail->voicemail_message_uuid = check_str($voicemail_message_uuid);
|
||||
$result = $voicemail->message_toggle();
|
||||
unset($voicemail);
|
||||
$toggled++;
|
||||
if (is_uuid($voicemail_uuid) && is_uuid($voicemail_message_uuid)) {
|
||||
$voicemail = new voicemail;
|
||||
$voicemail->db = $db;
|
||||
$voicemail->domain_uuid = $_SESSION['domain_uuid'];
|
||||
$voicemail->voicemail_uuid = $voicemail_uuid;
|
||||
$voicemail->voicemail_message_uuid = $voicemail_message_uuid;
|
||||
$result = $voicemail->message_toggle();
|
||||
unset($voicemail);
|
||||
$toggled++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,7 +68,7 @@ else {
|
||||
|
||||
//redirect the user
|
||||
if ($toggled > 0) {
|
||||
$_SESSION["message"] = $text['message-toggled'].': '.$toggled;
|
||||
message::add($text['message-toggled'].': '.$toggled);
|
||||
}
|
||||
if ($referer_path == PROJECT_PATH."/app/voicemails/voicemail_messages.php") {
|
||||
header("Location: voicemail_messages.php?".$referer_query);
|
||||
|
||||
Reference in New Issue
Block a user