mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Update dialplan.php
Committed by rdissauer - original pull request had a conflict. https://github.com/fusionpbx/fusionpbx/pull/1568
This commit is contained in:
@@ -270,8 +270,9 @@ include "root.php";
|
|||||||
public function import() {
|
public function import() {
|
||||||
if (strlen($this->xml) > 0) {
|
if (strlen($this->xml) > 0) {
|
||||||
//replace the variables
|
//replace the variables
|
||||||
|
$length = (is_numeric($_SESSION["security"]["pin_length"]["var"])) ? $_SESSION["security"]["pin_length"]["var"] : 8;
|
||||||
//$this->xml = str_replace("{v_context}", $this->default_context, $this->xml);
|
//$this->xml = str_replace("{v_context}", $this->default_context, $this->xml);
|
||||||
$this->xml = str_replace("{v_pin_number}", generate_password(8, 1), $this->xml);
|
$this->xml = str_replace("{v_pin_number}", generate_password($length, 1), $this->xml);
|
||||||
$this->xml = str_replace("{v_switch_recordings_dir}", $_SESSION['switch']['recordings']['dir'], $this->xml);
|
$this->xml = str_replace("{v_switch_recordings_dir}", $_SESSION['switch']['recordings']['dir'], $this->xml);
|
||||||
//convert the xml string to an xml object
|
//convert the xml string to an xml object
|
||||||
$xml = simplexml_load_string($this->xml);
|
$xml = simplexml_load_string($this->xml);
|
||||||
|
|||||||
Reference in New Issue
Block a user