Update provision.php

Used to replace the domain name in the yealink_provision_url
This commit is contained in:
FusionPBX 2024-07-12 18:04:14 -06:00 committed by GitHub
parent b59b7ba98a
commit 42a3969836
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View File

@ -1201,6 +1201,12 @@
//replace the dynamic provision variables that are defined in default, domain, and device settings
if (is_array($provision)) {
foreach($provision as $key=>$val) {
if (!empty($val) && is_string($val) && strpos($val, '{$domain_name}') !== false) {
$val = str_replace('{$domain_name}', $domain_name, $val);
}
if (!empty($val) && is_string($val) && strpos($val, '${domain_name}') !== false) {
$val = str_replace('${domain_name}', $domain_name, $val);
}
$view->assign($key, $val);
}
}