mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 09:03:49 +00:00
Update destinations.php
This commit is contained in:
@@ -500,6 +500,23 @@ if (!class_exists('destinations')) {
|
||||
return $array;
|
||||
}
|
||||
|
||||
/**
|
||||
* valid destination
|
||||
*/
|
||||
public function valid($destination) {
|
||||
$destinations = $this->all('dialplan');
|
||||
foreach($destinations as $category => $array) {
|
||||
if (is_array($array)) {
|
||||
foreach ($array as $key => $value) {
|
||||
if ($destination == $value) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* delete records
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user