MOH: Delete bug fix.
This commit is contained in:
parent
a1699f6fa6
commit
acff646b5b
|
|
@ -484,8 +484,8 @@
|
||||||
echo " <tr class='list-header'>\n";
|
echo " <tr class='list-header'>\n";
|
||||||
if (permission_exists('music_on_hold_delete')) {
|
if (permission_exists('music_on_hold_delete')) {
|
||||||
echo " <th class='checkbox'>\n";
|
echo " <th class='checkbox'>\n";
|
||||||
echo " <input type='checkbox' id='checkbox_all_".$row['music_on_hold_uuid']."' name='checkbox_all' onclick=\"list_all_toggle('".$row['music_on_hold_uuid']."'); document.getElementById('checkbox_all_".$row['music_on_hold_uuid']."_hidden').value = this.checked ? 'true' : 'false';\">\n";
|
echo " <input type='checkbox' id='checkbox_all_".$row['music_on_hold_uuid']."' name='checkbox_all' onclick=\"list_all_toggle('".$row['music_on_hold_uuid']."'); document.getElementById('checkbox_all_".$row['music_on_hold_uuid']."_hidden').value = this.checked ? 'true' : '';\">\n";
|
||||||
echo " <input type='hidden' id='checkbox_all_".$row['music_on_hold_uuid']."_hidden' name='moh[".$row['music_on_hold_uuid']."][checked]' value='true' onclick=\"list_all_toggle('".$row['music_on_hold_uuid']."');\">\n";
|
echo " <input type='hidden' id='checkbox_all_".$row['music_on_hold_uuid']."_hidden' name='moh[".$row['music_on_hold_uuid']."][checked]'>\n";
|
||||||
echo " </th>\n";
|
echo " </th>\n";
|
||||||
}
|
}
|
||||||
echo " <th class='pct-50'>".$stream_details."</th>\n";
|
echo " <th class='pct-50'>".$stream_details."</th>\n";
|
||||||
|
|
|
||||||
|
|
@ -263,13 +263,7 @@ if (!class_exists('switch_music_on_hold')) {
|
||||||
foreach ($records as $music_on_hold_uuid => $record) {
|
foreach ($records as $music_on_hold_uuid => $record) {
|
||||||
if (is_uuid($music_on_hold_uuid)) {
|
if (is_uuid($music_on_hold_uuid)) {
|
||||||
if ($record['checked'] == 'true') {
|
if ($record['checked'] == 'true') {
|
||||||
foreach ($record as $key => $array) {
|
|
||||||
if (is_numeric($key) && is_array($array) && @sizeof($array) != 0) {
|
|
||||||
$moh[$music_on_hold_uuid][] = $array['file_name'];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
$moh[$music_on_hold_uuid]['delete'] = true;
|
$moh[$music_on_hold_uuid]['delete'] = true;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
foreach ($record as $key => $array) {
|
foreach ($record as $key => $array) {
|
||||||
if (is_numeric($key) && is_array($array) && @sizeof($array) != 0 && $array['checked'] == 'true') {
|
if (is_numeric($key) && is_array($array) && @sizeof($array) != 0 && $array['checked'] == 'true') {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue