X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=includes%2Ferrors.inc;h=fc8f4fb692fca3205b277009755fd70291cf90df;hb=0079bcececc5700a07b4bffb546f4ef5870d4ea9;hp=a9b68898498fb0e4f9854e678ad155b86a3bfa57;hpb=9dab04be9d81766f1878d3688ee73d0bcf29f5d2;p=fa-stable.git diff --git a/includes/errors.inc b/includes/errors.inc index a9b68898..fc8f4fb6 100644 --- a/includes/errors.inc +++ b/includes/errors.inc @@ -17,7 +17,7 @@ $before_box = ''; // temporary container for output html data before error box // display in message box. function error_handler($errno, $errstr, $file, $line) { - global $messages, $go_debug; + global $messages, $go_debug, $SysPrefs; // skip well known warnings we don't care about. // Please use restrainedly to not risk loss of important messages @@ -33,7 +33,8 @@ function error_handler($errno, $errstr, $file, $line) { $messages[] = array($errno, $errstr, $file, $line); else if($errno&~E_NOTICE)// log all not displayed messages error_log(user_company() . ':' . $_SESSION["wa_current_user"]->loginname.':' - . basename($file) .":$line: $errstr"); + . basename($file) .":$line:" . ( $SysPrefs->db_ok ? '':'[before upgrade]') + . " $errstr"); return true; } @@ -94,7 +95,12 @@ function error_box() { Helper to avoid sparse log notices. */ function end_flush () { - if (ob_get_level()) ob_end_flush(); + global $Ajax; + + if (isset($Ajax)) + $Ajax->run(); + + if (ob_get_level()) ob_end_flush(); } function display_db_error($msg, $sql_statement=null, $exit=true)