Update of /cvsroot/openfirst/base/config/functions
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16470/config/functions
Modified Files:
debug.php
Log Message:
clean up, $NO_ADD_DEBUG defaults to false
Index: debug.php
===================================================================
RCS file: /cvsroot/openfirst/base/config/functions/debug.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** debug.php 13 Mar 2005 01:19:58 -0000 1.11
--- debug.php 24 May 2005 20:49:25 -0000 1.12
***************
*** 31,35 ****
set_error_handler("ofirst_error_handler");
! $NO_ADD_BUG = TRUE;
// Handles errors by displaying a message and contacting openFIRST
--- 31,35 ----
set_error_handler("ofirst_error_handler");
! if (!isset($NO_ADD_BUG)) $NO_ADD_BUG = false;
// Handles errors by displaying a message and contacting openFIRST
***************
*** 39,42 ****
--- 39,43 ----
global $NO_ADD_BUG;
$dberrno = ofirst_dberrno();
+ $dberror = ofirst_dberror();
if(! function_exists("md5_file")) {
***************
*** 53,77 ****
Error Number: $errno";
! $specifics = "PHP_SELF: " . $_SERVER["PHP_SELF"] . "
! HTTP Host: " . $_SERVER["HTTP_HOST"] . "
! HTTP Referer: " . $_SERVER["HTTP_REFERER"] . "
! Translated Path: " . $_SERVER["PATH_TRANSLATED"] . "
! User (if exists): $user->user
! User Access Level: $user->membertype
! Error Description: $error in $file on line $line" . (($dberrno != 0) ? "" : ("
! DB Error Number: $dberrno
! DB Error: " . ofirst_dberror() . "
! Last Query: $lastquery"));
- #var_dump($NO_ADD_BUG);
if ($NO_ADD_BUG)
{
! if ($errno == 2) return;
! echo "<br /><b>Error:</b><blockquote>";
! echo "<b>Details:</b><pre>";
echo $details;
! echo "</pre><b>Specifics:</b><pre>";
echo $specifics;
! echo "</pre></blockquote>";
} else {
// Notify the appropriate local contact
--- 54,81 ----
Error Number: $errno";
! $specifics = "PHP_SELF: {$_SERVER['PHP_SELF']}
! HTTP Host: {$_SERVER['HTTP_HOST']}
! HTTP Referer: {$_SERVER['HTTP_REFERER']}
! Translated Path: {$_SERVER['PATH_TRANSLATED']}
! User (if exists): {$user->user}
! User Access Level: {$user->membertype}
! Error Description: {$error} in {$file} on line {$line}";
! if ($dberrno != 0) {
! $specifics .= "
! DB Error Number: {$dberrno}
! DB Error: ".ofirst_dberror()."
! Last Query: {$lastquery}";
! }
if ($NO_ADD_BUG)
{
! // if ($errno == 2) return;
! echo "<br /><div class=\"error\"><h2>Error:</h2><dl>";
! echo "<dt>Details:</dt><dd><pre>";
echo $details;
! echo "</pre></dd>";
! echo "<dt>Specifics:</dt><dd><pre>";
echo $specifics;
! echo "</pre></dd></dl></div>";
} else {
// Notify the appropriate local contact
|