[Logicampus-cvs] logicampus/src/logicreate/lib LC_include.php, 1.38, 1.39
Brought to you by:
trilexcom
From: Mark K <har...@us...> - 2008-08-13 22:08:26
|
Update of /cvsroot/logicampus/logicampus/src/logicreate/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31525/logicreate/lib Modified Files: LC_include.php Log Message: Change the way errors are displayed so that it doesn't put HTML before the start HTML tag. Index: LC_include.php =================================================================== RCS file: /cvsroot/logicampus/logicampus/src/logicreate/lib/LC_include.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** LC_include.php 8 Oct 2007 14:35:28 -0000 1.38 --- LC_include.php 13 Aug 2008 22:08:22 -0000 1.39 *************** *** 287,292 **** $obj->menu = menuObj::getVisibleCached($obj->user->groups); - # Shopping cart menu - #shop::getMenu($obj->menu,$t['cart']); #CART /***** * Faculty classes taught --- 287,290 ---- *************** *** 311,314 **** --- 309,315 ---- */ + //log errors + lcSystem::logErrors(); + /***** * Private Messages *************** *** 328,339 **** } ! if (defined('DEBUG') && DEBUG) { ! $e =& ErrorStack::_singleton(); ! if ($e->count) { ! echo <<<END <form id="errorbox"> ! <div style="position:absolute;top:80px;left:70px;padding:3px;width:40em;background-color:#C0C0C0;border-style:outset"> <table width="100%" cellpadding="5" cellspacing="0" border="0"> <tr> --- 329,368 ---- } ! } ! ! function logErrors() { ! if ((defined('DEBUG') && !DEBUG) || !defined('DEBUG')) { ! $e =& ErrorStack::_singleton(); ! if ($e->count) { ! $errlog = ErrorStack::logStack(); ! $date = date('m-d-Y'); ! $time = time(); ! $u = lcUser::getCurrentUser(); ! $log = $time.':'.$u->username.':' . base64_encode($errlog); ! $touch = 0; ! system("touch /tmp/lcerrlog/$date.log",$touch); ! if ($touch) { ! system("mkdir /tmp/lcerrlog/"); ! system("touch /tmp/lcerrlog/$date.log",$touch); ! } ! system("echo $log >> /tmp/lcerrlog/$date.log"); ! } ! } ! } ! ! function getErrorBox() { ! ! if ((defined('DEBUG') && !DEBUG) || !defined('DEBUG')) { ! return; ! } ! $e =& ErrorStack::_singleton(); ! if (!$e->count) { ! return; ! } ! echo <<<END <form id="errorbox"> ! <div style="position:absolute;top:80px;left:70px;padding:3px;width:50em;background-color:#C0C0C0;border-style:outset"> <table width="100%" cellpadding="5" cellspacing="0" border="0"> <tr> *************** *** 403,432 **** END; - - $errlog = ErrorStack::logStack(); - //add your own email name here - //mail('er...@ow...','ERRORS ON CAMPUS',$errlog); - unset($errlog); - } - } else { - $e =& ErrorStack::_singleton(); - if ($e->count) { - $errlog = ErrorStack::logStack(); - $date = date('m-d-Y'); - $time = time(); - $u = lcUser::getCurrentUser(); - $log = $time.':'.$u->username.':' . base64_encode($errlog); - $touch = 0; - system("touch /tmp/lcerrlog/$date.log",$touch); - if ($touch) { - system("mkdir /tmp/lcerrlog/"); - system("touch /tmp/lcerrlog/$date.log",$touch); - } - system("echo $log >> /tmp/lcerrlog/$date.log"); - } - } - } - } --- 432,436 ---- |