From 2b8f95953375aba0e337c102a8c1c1080665613c Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 17 Jan 2007 04:06:11 +0000 Subject: [PATCH] Phoneaccount - Only add uid related entry if uid is not numeric Macro - Corrected comment detection git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5576 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofon/macro/class_gofonMacro.inc | 5 +++-- plugins/gofon/phoneaccount/class_phoneAccount.inc | 14 ++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/plugins/gofon/macro/class_gofonMacro.inc b/plugins/gofon/macro/class_gofonMacro.inc index 2ce08a7fb..4c3c40a8f 100755 --- a/plugins/gofon/macro/class_gofonMacro.inc +++ b/plugins/gofon/macro/class_gofonMacro.inc @@ -278,9 +278,10 @@ class macro extends plugin * Remove comments introduced by ; * Skip empty lines */ - $s_linestr = preg_replace ("/^.*=\> /","",$s_linestr); - $s_linestr = preg_replace("/;.*$/","",$s_linestr) ; $s_linestr = trim($s_linestr); + $s_linestr = preg_replace("/;.*$/","",$s_linestr) ; + $s_linestr = preg_replace ("/^.*=\> /","",$s_linestr); + if(empty($s_linestr)){ continue; } diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc index 46291a13c..ff643f9fc 100644 --- a/plugins/gofon/phoneaccount/class_phoneAccount.inc +++ b/plugins/gofon/phoneaccount/class_phoneAccount.inc @@ -700,12 +700,14 @@ class phoneAccount extends plugin $i = 0; $EXT = array(); - $EXT[$i]['context'] = 'GOsa'; - $EXT[$i]['exten'] = $this->uid; - $EXT[$i]['priority']= 1; - $EXT[$i]['app'] = "Goto"; - $EXT[$i]['appdata'] = $newnums[$i_new_key]."|1"; - $i ++; + if(!is_numeric($this->uid)){ + $EXT[$i]['context'] = 'GOsa'; + $EXT[$i]['exten'] = $this->uid; + $EXT[$i]['priority']= 1; + $EXT[$i]['app'] = "Goto"; + $EXT[$i]['appdata'] = $newnums[$i_new_key]."|1"; + $i ++; + } // Entension entries Hint / Dial / Goto foreach($newnums as $s_telenums){ -- 2.30.2