summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 386a195)
raw | patch | inline | side by side (parent: 386a195)
author | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 18 May 2005 19:13:56 +0000 (19:13 +0000) | ||
committer | cajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 18 May 2005 19:13:56 +0000 (19:13 +0000) |
diff --git a/html/index.php b/html/index.php
index 9ced14d6732b888ed9abaf8207020807812b12f5..d218040f29717a76b9d85435271827151242ed65 100644 (file)
--- a/html/index.php
+++ b/html/index.php
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 ();
if (isset($_SESSION['errors'])){
$smarty->assign("errors", $_SESSION['errors']);
}
+$smarty->assign("php_error", $error_collector);
$smarty->display (get_template_path('login.tpl'));
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
index c40913bf87f9fca86cd5041da0430e56249be2ea..fea2a6785f06c0d6b87390c80061bc53bef98050 100644 (file)
<!-- Headline -->
<body>
+{$php_errors}
<form action='main.php{$plug}' name='mainform' method='post' enctype='multipart/form-data'>
<table width="100%" border="0" cellspacing="0" cellpadding="0" cellpadding="3" bgcolor="#5353ad" height=100%>
<tr>
index 05df7a9d80a622d4494a4eb9bec70972291f7a95..726922eeddd9dd167c60f499ab262c677f413624 100644 (file)
<!-- Spacer for some browsers -->
{$errors}
+{$php_errors}
<div class='gosaLoginSpacer'></div>
<table class='gosaLoginMask' align='center'>
index bea694193464ad1b2e86aa567213cbc9cefde378..919040963b4e0602c11f28836a06d1d96050e880 100644 (file)
<!-- Headline -->
+{$php_errors}
<form action='main.php{$plug}' name='mainform' method='post' enctype='multipart/form-data'>
<script language="JavaScript" type="text/javascript">
<!--
index 2fb34887786788787c45ac6d35285fa49dd51244..b382740b2100fb8b910e69f588dcb6833ab65eb6 100644 (file)
{* GOsa login - smarty template *}
+{$php_errors}
+{$errors}
<!-- Spacer for some browsers -->
<div class='gosaLoginSpacer'></div>
index 05df7a9d80a622d4494a4eb9bec70972291f7a95..5ec71bc791ada73ba9f36b49599543ef47aa50c8 100644 (file)
{* GOsa login - smarty template *}
<!-- Spacer for some browsers -->
+{$php_errors}
{$errors}
<div class='gosaLoginSpacer'></div>
diff --git a/include/functions.inc b/include/functions.inc
index cf2787b8c502d99d0d87742b55050dedda9d26a2..72bd6723f2092d9b0e4cc94c4bbc650b13f1facf 100644 (file)
--- a/include/functions.inc
+++ b/include/functions.inc
$trace= debug_backtrace();
/* Create error header */
- $error_collector.= "<table width=100% cellspacing=0 style='background-color:#804010;color:white;border:2px solid #F09000'><tr><td colspan=3><b>"._("Error").":</b> $errstr</td></tr>";
+ $error_collector.= "<table width=100% cellspacing=0 style='background-color:#402005;color:white;border:2px solid red'><tr><td colspan=3><b>"._("PHP error")."</b> \"$errstr\"</td></tr>";
/* Generate trace history */
for ($index= 1; $index<count($trace); $index++){
}
$args= "";
foreach ($ct['args'] as $arg){
- $args.= "\"$arg\", ";
+ $args.= htmlentities("\"$arg\", ");
}
$args= preg_replace("/, $/", "", $args);
$file= $ct['file'];
$line= $ct['line'];
- $color= ($index&1)?'#905020':'703000';
+ $color= ($index&1)?'#452510':'351500';
$error_collector.= "<tr style='background-color:$color'><td style='padding-left:20px' width=30%>"._("Trace")."[$index]: $loc</td>";
$error_collector.= "<td>"._("File").": $file ("._('Line')." $line)</td><td width=10%>"._("Type").": $type</td></tr>";
$error_collector.= "<tr style='background-color:$color'><td colspan=3 style='padding-left:20px;'>"._("Arguments").": $args</td></tr>";