Add type to the destination class valid method.
This commit is contained in:
@@ -427,6 +427,7 @@ if (!class_exists('destinations')) {
|
|||||||
}
|
}
|
||||||
$x++;
|
$x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->destinations[$x]['type'] = 'array';
|
$this->destinations[$x]['type'] = 'array';
|
||||||
$this->destinations[$x]['label'] = 'other';
|
$this->destinations[$x]['label'] = 'other';
|
||||||
$this->destinations[$x]['name'] = 'dialplans';
|
$this->destinations[$x]['name'] = 'dialplans';
|
||||||
@@ -549,8 +550,8 @@ if (!class_exists('destinations')) {
|
|||||||
/**
|
/**
|
||||||
* valid destination
|
* valid destination
|
||||||
*/
|
*/
|
||||||
public function valid($destination) {
|
public function valid($destination, $type = 'dialplan') {
|
||||||
$destinations = $this->all('dialplan');
|
$destinations = $this->all($type);
|
||||||
foreach($destinations as $category => $array) {
|
foreach($destinations as $category => $array) {
|
||||||
if (is_array($array)) {
|
if (is_array($array)) {
|
||||||
foreach ($array as $key => $value) {
|
foreach ($array as $key => $value) {
|
||||||
|
|||||||
Reference in New Issue
Block a user