Code

W3C Fixes
[gosa.git] / html / index.php
index 9ced14d6732b888ed9abaf8207020807812b12f5..d241be351675b95db82c349d593f9b45858ff7ed 100644 (file)
@@ -23,6 +23,10 @@ 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 ();
@@ -78,6 +82,8 @@ if (!(is_dir($smarty->compile_dir) && is_writable($smarty->compile_dir))){
   exit();
 }
 
+/* Check for old files in compile directory */
+clean_smarty_compile_dir($smarty->compile_dir);
 
 /* Language setup */
 if ($config->data['MAIN']['LANG'] == ""){
@@ -232,6 +238,11 @@ $smarty->assign ("PHPSESSID", session_id());
 if (isset($_SESSION['errors'])){
   $smarty->assign("errors", $_SESSION['errors']);
 }
+if ($error_collector != ""){
+  $smarty->assign("php_errors", $error_collector."</div>");
+} else {
+  $smarty->assign("php_errors", "");
+}
 $smarty->display (get_template_path('login.tpl'));
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: