mirror of
https://gitlab.linphone.org/BC/public/flexisip-account-manager.git
synced 2026-04-17 19:58:27 +00:00
Complete and fix the generated provisioning XML
Use require_once to load the hooks and prevent double inclusion
This commit is contained in:
parent
82526da4fd
commit
683e8164fc
2 changed files with 8 additions and 4 deletions
|
|
@ -65,7 +65,7 @@ class ProvisioningController extends Controller
|
|||
$provisioningHooks = config_path('provisioning_hooks.php');
|
||||
|
||||
if (file_exists($provisioningHooks)) {
|
||||
require($provisioningHooks);
|
||||
require_once($provisioningHooks);
|
||||
}
|
||||
|
||||
$dom = new \DOMDocument('1.0', 'UTF-8');
|
||||
|
|
@ -119,7 +119,7 @@ class ProvisioningController extends Controller
|
|||
$section = $dom->createElement('section');
|
||||
$section->setAttribute('name', 'proxy_' . $proxyConfigIndex);
|
||||
|
||||
$entry = $dom->createElement('entry', $account->identifier);
|
||||
$entry = $dom->createElement('entry', '<sip:'.$account->identifier.'>');
|
||||
$entry->setAttribute('name', 'reg_identity');
|
||||
$section->appendChild($entry);
|
||||
|
||||
|
|
@ -144,10 +144,14 @@ class ProvisioningController extends Controller
|
|||
$section = $dom->createElement('section');
|
||||
$section->setAttribute('name', 'auth_info_' . $authInfoIndex);
|
||||
|
||||
$entry = $dom->createElement('entry', $account->identifier);
|
||||
$entry = $dom->createElement('entry', $account->username);
|
||||
$entry->setAttribute('name', 'username');
|
||||
$section->appendChild($entry);
|
||||
|
||||
$entry = $dom->createElement('entry', $account->domain);
|
||||
$entry->setAttribute('name', 'domain');
|
||||
$section->appendChild($entry);
|
||||
|
||||
$entry = $dom->createElement('entry', $password->password);
|
||||
$entry->setAttribute('name', 'ha1');
|
||||
$section->appendChild($entry);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
#%define _datadir %{_datarootdir}
|
||||
#%define _docdir %{_datadir}/doc
|
||||
|
||||
%define build_number 98
|
||||
%define build_number 99
|
||||
%define var_dir /var/opt/belledonne-communications
|
||||
%define opt_dir /opt/belledonne-communications/share/flexisip-account-manager
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue