From 43b5d26492856d5d1914b2bba48344156cce80c0 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 8 Aug 2005 09:50:34 +0000 Subject: [PATCH] Added check if Macro Parameter count changes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1075 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofon/macro/class_gofonMacroParameters.inc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/gofon/macro/class_gofonMacroParameters.inc b/plugins/gofon/macro/class_gofonMacroParameters.inc index dd2c2be08..928f3227b 100755 --- a/plugins/gofon/macro/class_gofonMacroParameters.inc +++ b/plugins/gofon/macro/class_gofonMacroParameters.inc @@ -17,6 +17,8 @@ class macroParameter extends plugin /*! CLI vars */ var $cli_parameters= array("eins" => "Eins ist toll", "zwei" => "Zwei ist noch besser"); + /* Parameter Count*/ + var $para_count = 0 ; /*! macro base */ var $base= ""; @@ -94,8 +96,12 @@ class macroParameter extends plugin $tmp2[$num]['var'] = "var".$num; } + /* Assign this array */ $this->goFonMacroParameter = $tmp2; + + $this->para_count = count ($tmp2); + } //! Perform Parameter check @@ -171,7 +177,7 @@ class macroParameter extends plugin $vars = ""; $tmp = array(); $number = 0; - + $content = $_SESSION['macroManagment']->macrotabs->by_object['macro']->goFonMacroContent; if(strstr($content,"ARG")){ @@ -353,6 +359,10 @@ class macroParameter extends plugin $this->attrs['goFonMacroParameter'][]=$key."!".$fonpara['name']."!".$fonpara['type']."!".$fonpara['default']; } + if($this->para_count != count($this->attrs['goFonMacroParameter'])){ + print_red(_("Parameter count of the macro changed, you must update each user which are using this macro '%s'."),$this->dn); + } + unset($this->attrs['base']); /* Write back to ldap */ -- 2.30.2