Update music_on_hold_edit.php
Make sure reload mod local stream after editing it.
This commit is contained in:
parent
cdeb3f20c2
commit
ed89df28c5
|
|
@ -104,6 +104,7 @@
|
||||||
//add or update the database
|
//add or update the database
|
||||||
if ($_POST["persistformvar"] != "true") {
|
if ($_POST["persistformvar"] != "true") {
|
||||||
if ($action == "add" && permission_exists('music_on_hold_add')) {
|
if ($action == "add" && permission_exists('music_on_hold_add')) {
|
||||||
|
//insert the new music on hold
|
||||||
$sql = "insert into v_music_on_hold ";
|
$sql = "insert into v_music_on_hold ";
|
||||||
$sql .= "(";
|
$sql .= "(";
|
||||||
$sql .= "domain_uuid, ";
|
$sql .= "domain_uuid, ";
|
||||||
|
|
@ -147,8 +148,13 @@
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
|
//reload mod local stream
|
||||||
|
$music = new switch_music_on_hold;
|
||||||
|
$music->reload();
|
||||||
|
|
||||||
|
//set the message and redirect the user
|
||||||
$_SESSION["message"] = $text['message-add'];
|
$_SESSION["message"] = $text['message-add'];
|
||||||
header("Location: music_on_holds.php");
|
header("Location: music_on_hold.php");
|
||||||
return;
|
return;
|
||||||
} //if ($action == "add")
|
} //if ($action == "add")
|
||||||
|
|
||||||
|
|
@ -180,6 +186,11 @@
|
||||||
$db->exec(check_sql($sql));
|
$db->exec(check_sql($sql));
|
||||||
unset($sql);
|
unset($sql);
|
||||||
|
|
||||||
|
//reload mod local stream
|
||||||
|
$music = new switch_music_on_hold;
|
||||||
|
$music->reload();
|
||||||
|
|
||||||
|
//set the message and redirect the user
|
||||||
$_SESSION["message"] = $text['message-update'];
|
$_SESSION["message"] = $text['message-update'];
|
||||||
header("Location: music_on_hold.php");
|
header("Location: music_on_hold.php");
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue