From 95286103b454377ded1d9a563367a070b7a080e8 Mon Sep 17 00:00:00 2001 From: cajus Date: Wed, 27 Jan 2010 08:16:52 +0000 Subject: [PATCH] Added error message if tab type is missing git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15345 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_management.inc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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); + } } } -- 2.30.2