Code

Ensure that setup schema check will still work
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 18 Jun 2007 07:48:12 +0000 (07:48 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 18 Jun 2007 07:48:12 +0000 (07:48 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6610 594d385d-05f5-0310-b6e9-bd551577e9d8

include/class_ldap.inc

index 84e5a7fb284647dfc1cc4eabb69e3f7e348c2ff5..e191657f304f15345b4b32ae25d18adfb621023b 100644 (file)
@@ -1313,9 +1313,11 @@ function gen_xls ($dn, $filter= "(objectClass=*)", $attributes= array('*'), $rec
   {
     global $config;
     $objectclasses = array();
-      
-    if(!isset($config->data['MAIN']['SCHEMA_CHECK']) || !preg_match("/true/i",$config->data['MAIN']['SCHEMA_CHECK'])){
-      return($objectclasses);
+
+    if(isset($config) && preg_match("/config/i",get_class($config))){
+      if(!isset($config->data['MAIN']['SCHEMA_CHECK']) || !preg_match("/true/i",$config->data['MAIN']['SCHEMA_CHECK'])){
+        return($objectclasses);
+      }
     }
 
 # Get base to look for schema