[Openfirst-cvscommit] base/config/functions debug.php,1.10,1.11
Brought to you by:
xtimg
From: Astronouth7303 <ast...@us...> - 2005-03-13 01:20:10
|
Update of /cvsroot/openfirst/base/config/functions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9875/config/functions Modified Files: debug.php Log Message: Last PEAR commit for now Index: debug.php =================================================================== RCS file: /cvsroot/openfirst/base/config/functions/debug.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** debug.php 28 Dec 2004 18:28:35 -0000 1.10 --- debug.php 13 Mar 2005 01:19:58 -0000 1.11 *************** *** 31,34 **** --- 31,35 ---- set_error_handler("ofirst_error_handler"); + $NO_ADD_BUG = TRUE; // Handles errors by displaying a message and contacting openFIRST *************** *** 36,39 **** --- 37,41 ---- function ofirst_error_handler($errno,$error,$file,$line) { global $dbasetype, $ostype, $sqlserver, $currentmodule, $user, $mailnotify, $mailfrom, $lastquery; + global $NO_ADD_BUG; $dberrno = ofirst_dberrno(); *************** *** 50,53 **** --- 52,56 ---- Current Module: $currentmodule Error Number: $errno"; + $specifics = "PHP_SELF: " . $_SERVER["PHP_SELF"] . " HTTP Host: " . $_SERVER["HTTP_HOST"] . " *************** *** 56,65 **** 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")); ! // Notify the appropriate local contact mail($mailnotify, "$error in $file on line $line", "Error Description: $error in $file on line $line --- 59,79 ---- 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 mail($mailnotify, "$error in $file on line $line", "Error Description: $error in $file on line $line *************** *** 74,78 **** "&uri=" . urlencode($_SERVER["HTTP_HOST"] . $_SERVER["SCRIPT_NAME"]). "&details=".urlencode($details). ! "&specifics=".urlencode($specifics), "r"); if(! $bugzilla) { --- 88,93 ---- "&uri=" . urlencode($_SERVER["HTTP_HOST"] . $_SERVER["SCRIPT_NAME"]). "&details=".urlencode($details). ! "&specifics=".urlencode($specifics) . ! ($NO_ADD_BUG ? "&no-commit=true" : ""), "r"); if(! $bugzilla) { *************** *** 94,97 **** --- 109,113 ---- } } + } } ?> |