From 52e76ee47a5173edf81c21322a4d797b82094f46 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 24 Jun 2008 06:52:10 +0000 Subject: [PATCH] Fixed problem with missing parene object, when editing a phone account from the my account section. - Added parent object, this should be logical. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11405 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../gofon/phoneaccount/class_phoneAccount.inc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc index d7845277b..c5796a688 100644 --- a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc +++ b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc @@ -67,7 +67,19 @@ class phoneAccount extends plugin } /* Set parent object to tab object */ - $this->parent = $parent->parent; + if(is_object($parent)){ + $this->parent = $parent->parent; + }else{ + + /* Workaround ... + FIXME, * If there is time, split this code into class_voip.inc and class_phoneaccount.inc + This code is to much to be comprehensible and understandable. + * We don't need a parent object here, we just need a reference to the users uid and cn. + + */ + $this->parent = new usertabs($this->config, + $this->config->data['TABS']['USERTABS'],$this->dn); + } /* Set uid */ if((isset($this->parent->by_object['user']->uid))&&(!empty($this->parent->by_object['user']->uid))){ @@ -76,6 +88,7 @@ class phoneAccount extends plugin if((isset($this->parent->by_object['user']->cn))&&(!empty($this->parent->by_object['user']->cn))){ $this->cn = $this->parent->by_object['user']->cn; } + /* Check server configurations * Load all server configuration in $this->goFonHomeServers if available -- 2.30.2