Code

Added schema readable check to index.php,
[gosa.git] / html / index.php
index d241be351675b95db82c349d593f9b45858ff7ed..157009be553f2c9bd9002ffb4366d235b5f4c706 100644 (file)
@@ -23,10 +23,6 @@ require_once ("../include/php_setup.inc");
 require_once ("functions.inc");
 header("Content-type: text/html; charset=UTF-8");
 
-/* Reset error handler */
-$error_collector= "";
-set_error_handler('gosaRaiseError');
-
 /* Set error handler to own one, initialize time calculation
    and start session. */
 session_start ();
@@ -146,6 +142,14 @@ if ($_SERVER["REQUEST_METHOD"] == "POST"){
     exit();
   }
 
+  $ldap->search("(objectClass=*)",array("subschemaSubentry"));
+  $attrs= $ldap->fetch();
+  if(!count($attrs)){
+    print_red(_("Can't read schema informations, GOsa needs to know your schema setup. Pleasy verify taht it is readable for GOsa"));
+    echo $_SESSION['errors'];
+    exit();
+  }
+
   /* Check for locking area */
   $ldap->cat($config->current['CONFIG']);
   $attrs= $ldap->fetch();