From c89577523ff3f0a6e3777c3b5b6143cd7fbad220 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 5 Oct 2005 09:01:06 +0000 Subject: [PATCH] %tags will be replaced automaticaly git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1478 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../gofon/phoneaccount/class_phoneAccount.inc | 21 ++++++++++--------- plugins/gofon/phoneaccount/generic.tpl | 1 - 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc index 2a862b040..ca9520191 100644 --- a/plugins/gofon/phoneaccount/class_phoneAccount.inc +++ b/plugins/gofon/phoneaccount/class_phoneAccount.inc @@ -19,7 +19,8 @@ class phoneAccount extends plugin var $hardware_list = array(); var $used_hardware = array(); var $goFonMacro = ""; - var $macro = 0; // Selected Macro + var $macro = 0; // Selected Macroi + var $lastmacro = ""; var $macros = array(); // List of macros for smarty select box var $macroarray = array(); // All needed macro informations var $macrostillavailable = false; @@ -231,6 +232,7 @@ class phoneAccount extends plugin } } } + $this->lastmacro=$this->macro; @mysql_close($r_con) ; } @@ -635,21 +637,20 @@ class phoneAccount extends plugin $macrotab =""; /* for every single parameter-> display textfile,combo, or true false switch*/ + foreach($this->phoneNumbers as $phonenum){ + $tmp[] = $phonenum; + } - /* Automatic fill out */ - if(isset($_POST['fillout'])){ - - foreach($this->phoneNumbers as $phonenum){ - $tmp[] = $phonenum; - } - + + + if($this->macro != $this->lastmacro){ /* Go through all params */ foreach($this->macroarray[$this->macro] as $key => $paras){ $string = $paras['default']; $string=preg_replace("/%uid/i",$this->uid,$string); - + if(isset($this->cn)){ $string=preg_replace("/%cn/i",$this->cn,$string); } @@ -797,7 +798,7 @@ class phoneAccount extends plugin $smarty->assign ("hardware_list", $hl); /* Show main page */ - + $this->lastmacro = $this->macro; $display.= $smarty->fetch(get_template_path('generic.tpl', TRUE, dirname(__FILE__))); return($display); } diff --git a/plugins/gofon/phoneaccount/generic.tpl b/plugins/gofon/phoneaccount/generic.tpl index 382b55f72..43ad90d25 100644 --- a/plugins/gofon/phoneaccount/generic.tpl +++ b/plugins/gofon/phoneaccount/generic.tpl @@ -65,7 +65,6 @@ -
-- 2.30.2