Code

Added error message to class_tabs.inc
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 19 Aug 2008 12:22:44 +0000 (12:22 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 19 Aug 2008 12:22:44 +0000 (12:22 +0000)
- If there are no plugin definitions given abort intialization.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@12243 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/include/class_tabs.inc

index c7666fddff52ffb86e498d1299977eb3bb6f2fb1..a10db017ce7e333a7646fac07ef060e626d5cbb6 100644 (file)
@@ -43,6 +43,13 @@ class tabs
     $this->dn= $dn;
     $this->config= &$config;
 
+    if(!count($data)) {
+      $data[] = array("CLASS" => 'plugin',"NAME" => 'Error');
+      msg_dialog::display(_("Error"),
+        sprintf(_("No plugin definitions found to initialize '%s', please check your configuration file."),get_class($this)),
+        "ERROR_DIALOG");
+    }
+
     $baseobject= NULL;
     $this->acl_category = $acl_category;
     foreach ($data as &$tab){