MOH: Prevent duplicate options in MOH select boxes.
This commit is contained in:
parent
1c5e9196d6
commit
2305e71eb3
|
|
@ -82,7 +82,12 @@ include "root.php";
|
||||||
else {
|
else {
|
||||||
$moh_value = "local_stream://".$moh_name;
|
$moh_value = "local_stream://".$moh_name;
|
||||||
}
|
}
|
||||||
$select .= " <option value='".$moh_value."' ".(($this->select_value == $moh_value)?'selected="selected"':null).">".(str_replace('_', ' ', $moh_name))."</option>\n";
|
$options[$moh_value] = str_replace('_', ' ', $moh_name);
|
||||||
|
}
|
||||||
|
if (sizeof($options) > 0) {
|
||||||
|
foreach($options as $moh_value => $moh_name) {
|
||||||
|
$select .= "<option value='".$moh_value."' ".(($this->select_value == $moh_value) ? 'selected="selected"' : null).">".$moh_name."</option>\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//recordings
|
//recordings
|
||||||
if($dh = opendir($_SESSION['switch']['recordings']['dir']."/")) {
|
if($dh = opendir($_SESSION['switch']['recordings']['dir']."/")) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue