Wrong email-adress field taken when emailing documents [0000035].
[fa-stable.git] / includes / session.inc
index bad4ef65aa9bbfe2fa24085e012d37ab3ab1d31e..34e01cd214a56260a76802006cd53d6a30fcde6f 100644 (file)
 
        function output_html($text)
        {
-         global $before_box, $Ajax;
+         global $before_box, $Ajax, $messages;
+               // Fatal errors are not send to error_handler, 
+               // so we must check the output
+         if ($text && preg_match('/\bFatal error(<.*?>)?:(.*)/i', $text, $m)) {
+               $Ajax->aCommands = array();  // Don't update page on errors
+               
+               $messages[] = array(E_ERROR, $m[0], null, null);
+         }
          $Ajax->run();
          return  in_ajax() ? fmt_errors() : ($before_box.fmt_errors().$text);
        }
@@ -90,7 +97,6 @@
                        echo "<center><br><br><br><b>";
                        echo _("The security settings on your account do not permit you to access this function");
                        echo "</b>";
-                       echo "<br><br><a href='javascript:history.go(-1)'>" . _("Back") . "</a>";
                        echo "<br><br><br><br></center>";
                        //echo '<script type="text/javascript">';
                        //echo 'alert("' . _("The security settings on your account do not permit you to access this function") . '");';