summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 461ae3b)
raw | patch | inline | side by side (parent: 461ae3b)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 26 May 2010 08:15:34 +0000 (08:15 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 26 May 2010 08:15:34 +0000 (08:15 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18745 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_management.inc | patch | blob | history |
index 66bdc4cf2b73a201e86ef9ecc36b881d2bb39540..837688dc568a9d1ec7fd65e6a998384eb2aa5445 100644 (file)
if(empty($tabClass) || empty($tabType)){
trigger_error("We can't edit any object(s). 'tabClass' or 'tabType' is empty!");
}else{
+
$tab = $tabClass;
- $this->tabObject= new $tab($this->config,$this->config->data['TABS'][$tabType], $this->dn,$aclCategory);
- @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dn,"Edit entry initiated!");
- $this->tabObject->set_acl_base($this->dn);
- $this->tabObject->parent = &$this;
+
+ // Check if the base plugin is available - it is mostly responsible for object creation and removal.
+ $first = $this->config->data['TABS'][$tabType][0];
+ if(!class_available($first['CLASS'])){
+ msg_dialog::display(_("Internal error"),
+ sprintf(_("Cannot instantiate tabbed-plugin, the base plugin (%s) is not available!"), $first['CLASS']),
+ ERROR_DIALOG);
+ }else{
+ $this->tabObject= new $tab($this->config,$this->config->data['TABS'][$tabType], $this->dn,$aclCategory);
+ @DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,$this->dn,"Edit entry initiated!");
+ $this->tabObject->set_acl_base($this->dn);
+ $this->tabObject->parent = &$this;
+ }
}
}else{