|
@@ -110,17 +110,18 @@ if (!class_exists('ringbacks')) {
|
|
|
|
|
|
//music list
|
|
|
if (count($this->music_list) > 0) {
|
|
|
- $select .= " <optgroup label='".$text['label-music_on_hold']."'>";
|
|
|
+ $select .= " <optgroup label='".$text['label-music_on_hold']."'>\n";
|
|
|
+ $previous_name = '';
|
|
|
foreach($this->music_list as $row) {
|
|
|
- $name = '';
|
|
|
- if (strlen($row['domain_uuid']) > 0) {
|
|
|
- $name = $row['domain_name'].'/';
|
|
|
+ if ($previous_name != $row['music_on_hold_name']) {
|
|
|
+ $name = '';
|
|
|
+ if (strlen($row['domain_uuid']) > 0) {
|
|
|
+ $name = $row['domain_name'].'/';
|
|
|
+ }
|
|
|
+ $name .= $row['music_on_hold_name'];
|
|
|
+ $select .= " <option value='local_stream://".$name."' ".(($selected == "local_stream://".$name) ? 'selected="selected"' : null).">".$row['music_on_hold_name']."</option>\n";
|
|
|
}
|
|
|
- $name .= $row['music_on_hold_name'];
|
|
|
- if (strlen($row['music_on_hold_rate']) > 0) {
|
|
|
- $name = $name.'/'.$row['music_on_hold_rate'];
|
|
|
- }
|
|
|
- $select .= " <option value='local_stream://".$name."' ".(($selected == "local_stream://".$name) ? 'selected="selected"' : null).">".$row['music_on_hold_name']."</option>\n";
|
|
|
+ $previous_name = $row['music_on_hold_name'];
|
|
|
}
|
|
|
$select .= " </optgroup>\n";
|
|
|
}
|