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:
FusionPBX
2016-06-30 19:08:10 -06:00
committed by GitHub
parent 849f8fd050
commit 51c12ea5bd
@@ -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');