Update switch_music_on_hold.php
Change music on hold class method streams to get. Following HTTP REST concept for the name to get the list of data. This same convention can be used in any class.
This commit is contained in:
parent
35149d0ff3
commit
2c5b5b6183
|
|
@ -59,8 +59,8 @@ include "root.php";
|
|||
$select = "<select class='formfld' name='".$name."' id='".$name."' style='width: auto;'>\n";
|
||||
|
||||
//music on hold
|
||||
$options = $this->streams();
|
||||
if (sizeof($options) > 0) {
|
||||
$options = $this->get();
|
||||
if (count($options) > 0) {
|
||||
$select .= " <optgroup label='".$text['label-music_on_hold']."'>";
|
||||
foreach($options as $row) {
|
||||
$name = '';
|
||||
|
|
@ -99,7 +99,7 @@ include "root.php";
|
|||
return $select;
|
||||
}
|
||||
|
||||
public function streams() {
|
||||
public function get() {
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
$text = $language->get(null, 'app/music_on_hold');
|
||||
|
|
|
|||
Loading…
Reference in New Issue