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:
@@ -59,8 +59,8 @@ include "root.php";
|
|||||||
$select = "<select class='formfld' name='".$name."' id='".$name."' style='width: auto;'>\n";
|
$select = "<select class='formfld' name='".$name."' id='".$name."' style='width: auto;'>\n";
|
||||||
|
|
||||||
//music on hold
|
//music on hold
|
||||||
$options = $this->streams();
|
$options = $this->get();
|
||||||
if (sizeof($options) > 0) {
|
if (count($options) > 0) {
|
||||||
$select .= " <optgroup label='".$text['label-music_on_hold']."'>";
|
$select .= " <optgroup label='".$text['label-music_on_hold']."'>";
|
||||||
foreach($options as $row) {
|
foreach($options as $row) {
|
||||||
$name = '';
|
$name = '';
|
||||||
@@ -99,7 +99,7 @@ include "root.php";
|
|||||||
return $select;
|
return $select;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function streams() {
|
public function get() {
|
||||||
//add multi-lingual support
|
//add multi-lingual support
|
||||||
$language = new text;
|
$language = new text;
|
||||||
$text = $language->get(null, 'app/music_on_hold');
|
$text = $language->get(null, 'app/music_on_hold');
|
||||||
|
|||||||
Reference in New Issue
Block a user