Code

Added possibility to do notifications. Not used currently.
[gosa.git] / html / index.php
index b7f1ae83ae8f5e79290d66e38ef82b44a4d5725c..5a4f2128ace55ec478da35ddf9bf0fb293c0283c 100644 (file)
@@ -32,6 +32,12 @@ function displayLogin()
     if(isset($_POST["username"])){
       $username= $_POST["username"];
     }
+
+    /* Place ie workaround if needed */
+    if (isset($config->data['MAIN']['IE_PNG_WORKAROUND']) && preg_match("/true/i",$config->data['MAIN']['IE_PNG_WORKAROUND'])){
+      $smarty->assign('ieworkaround', 1);
+    }
+
     $smarty->assign ('date', gmdate("D, d M Y H:i:s"));
     $smarty->assign ('username', $username);
     $smarty->assign ('personal_img', get_template_path('images/personal.png'));
@@ -70,7 +76,7 @@ function displayLogin()
       $smarty->assign("errors", $_SESSION['errors']);
     }
     if ($error_collector != ""){
-      $smarty->assign("php_errors", $error_collector."</div>");
+      $smarty->assign("php_errors", preg_replace("/%BUGBODY%/",$error_collector_mailto,$error_collector)."</div>");
     } else {
       $smarty->assign("php_errors", "");
     }
@@ -102,9 +108,6 @@ if (!file_exists(CONFIG_DIR."/".CONFIG_FILE)){
   exit();
 }
 
-/* Reset errors */
-$_SESSION['errors']= "";
-
 /* Check for java script */
 if(isset($_POST['javascript']) && $_POST['javascript'] == "true") {
   $_SESSION['js']= TRUE;
@@ -379,14 +382,6 @@ if ($error_collector != ""){
   $smarty->assign("php_errors", "");
 }
 
-/* Set focus to the error button if we've an error message */
-$focus= "";
-if (isset($_SESSION['errors']) && $_SESSION['errors'] != ""){
-  $focus= '<script language="JavaScript" type="text/javascript">';
-  $focus.= 'document.forms[0].error_accept.focus();';
-  $focus.= '</script>';
-}
-$smarty->assign("focus", $focus);
 displayLogin();
 
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: