Code

first part of the account expiration code
[gosa.git] / html / index.php
index e1baef37cb86bb383a54fbf4c56965ec1a72ae56..ece9138c5cc7fd7b518881d782280babedddb260 100644 (file)
@@ -51,8 +51,7 @@ if(isset($_POST['javascript']) && $_POST['javascript'] == "true") {
 
 /* Check if gosa.conf is accessible */
 if (!is_readable(CONFIG_DIR."/gosa.conf")){
-  print_red(sprintf(_("GOsa configuration %s/gosa.conf is not readable. Aborted."), CONFIG_DIR));
-  echo $_SESSION['errors'];
+  echo sprintf(_("GOsa configuration %s/gosa.conf is not readable. Aborted."), CONFIG_DIR);
   exit();
 }
 
@@ -73,9 +72,8 @@ $smarty->assign ('nextfield', 'username');
 
 /* Check for compile directory */
 if (!(is_dir($smarty->compile_dir) && is_writable($smarty->compile_dir))){
-  print_red(sprintf(_("Directory '%s' specified as compile directory is not accessible!"),
-        $smarty->compile_dir));
-  echo $_SESSION['errors'];
+  echo sprintf(_("Directory '%s' specified as compile directory is not accessible!"),
+        $smarty->compile_dir);
   exit();
 }
 
@@ -172,7 +170,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['login'])){
     }
   }
   /* Check for locking area */
-  $ldap->cat($config->current['CONFIG']);
+  $ldap->cat($config->current['CONFIG'], array("dn"));
   $attrs= $ldap->fetch();
   if (!count ($attrs)){
     $ldap->cd($config->current['BASE']);
@@ -213,6 +211,8 @@ if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['login'])){
 
       /* Let GOsa trigger a new connection for each POST, save
          config to session. */
+      $config->get_departments();
+      $config->make_idepartments();
       $_SESSION['config']= $config;
 
       /* Go to main page */