From: cajus Date: Wed, 27 Jan 2010 08:16:52 +0000 (+0000) Subject: Added error message if tab type is missing X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=95286103b454377ded1d9a563367a070b7a080e8;p=gosa.git Added error message if tab type is missing git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15345 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/include/class_management.inc b/gosa-core/include/class_management.inc index 26cd2d037..f1a8ae6c3 100644 --- a/gosa-core/include/class_management.inc +++ b/gosa-core/include/class_management.inc @@ -574,10 +574,14 @@ class management if(empty($tabClass) || empty($tabType)){ // No tab type defined }else{ - $this->tabObject= new $tabClass($this->config,$this->config->data['TABS'][$tabType], $this->dn, $aclCategory); - $this->tabObject->set_acl_base($this->headpage->getBase()); - $this->tabObject->parent = &$this; - @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dn,"Create new entry initiated!"); + if (isset($this->config->data['TABS'][$tabType])) { + $this->tabObject= new $tabClass($this->config,$this->config->data['TABS'][$tabType], $this->dn, $aclCategory); + $this->tabObject->set_acl_base($this->headpage->getBase()); + $this->tabObject->parent = &$this; + @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dn,"Create new entry initiated!"); + } else { + msg_dialog::display(_("Error"), sprintf(_("No tab declaration for '%s' found in your configuration file. Cannot create plugin instance!"), $tabType), ERROR_DIALOG); + } } }