From 1abb3f651f7f85f4a54aace9eacd32ca841458f6 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 9 Jan 2007 05:39:08 +0000 Subject: [PATCH] Fixed warning for missing macro, but it was still available. The selected macro in user phone account will now be saved when the user is saved. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5488 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/gofon/phoneaccount/class_phoneAccount.inc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/gofon/phoneaccount/class_phoneAccount.inc b/plugins/gofon/phoneaccount/class_phoneAccount.inc index a3d5bc17b..642f01475 100644 --- a/plugins/gofon/phoneaccount/class_phoneAccount.inc +++ b/plugins/gofon/phoneaccount/class_phoneAccount.inc @@ -205,7 +205,7 @@ class phoneAccount extends plugin unset($tmp[0]); /* Check if makro has been removed */ - if(!isset($this->macroarray[$this->macro])){ + if(!isset($this->macros[$this->macro])){ $this->macrostillavailable = false; }else{ $this->macrostillavailable = true; @@ -1142,6 +1142,16 @@ class phoneAccount extends plugin { plugin::save(); + /* Force saving macro again + * This ensures that + * - the macro is available on the destiantion server. + * - the macro saved is up to date on the destination server. + */ + if(!empty($this->macro) && $this->macro != "none") { + $macro_tab = new macrotabs($this->config,$this->config->data['TABS']['MACROTABS'], $this->macro); + $macro_tab -> save(); + } + /* Save arrays */ $tmp_numbers = array(); foreach ($this->phoneNumbers as $number){ -- 2.30.2