From 8eecfa59d6d4cd0f5bf7205754eb58f869ca33bf Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 27 Jul 2016 23:09:32 -0600 Subject: [PATCH] Update dialplan.php Committed by rdissauer - original pull request had a conflict. https://github.com/fusionpbx/fusionpbx/pull/1568 --- app/dialplan/resources/classes/dialplan.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/dialplan/resources/classes/dialplan.php b/app/dialplan/resources/classes/dialplan.php index d28ff3193e..4310b1fd05 100644 --- a/app/dialplan/resources/classes/dialplan.php +++ b/app/dialplan/resources/classes/dialplan.php @@ -270,8 +270,9 @@ include "root.php"; public function import() { if (strlen($this->xml) > 0) { //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_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); //convert the xml string to an xml object $xml = simplexml_load_string($this->xml);