diff --git a/inc/databap.php b/inc/databap.php index 5469e26..b374b62 100755 --- a/inc/databap.php +++ b/inc/databap.php @@ -1999,7 +1999,7 @@ class Databap extends PhpObject $asInfo['from'] = self::MSG_TABLE; $asInfo['constraint'] = array('type'=>self::MESSAGE_NEWS); $asInfo['orderBy'] = array('led'=>'DESC'); - if($bExport) $asInfo['limit'] = 3; + if($bExport) $asInfo['limit'] = self::MAX_NB_NEWS; $asNews = $this->oMySql->selectRows($asInfo); //Status @@ -2619,6 +2619,11 @@ class Databap extends PhpObject header("Content-Type: text/css"); return $sStyle; } + + public function addUncaughtError($sError) + { + $this->addError('Uncaught errors:'."\n".$sError); + } public static function getDateFormat($oTime, $sFormat=Databap::DATE_TIME_FORMAT) { diff --git a/index.php b/index.php index b75aa70..cc0cb54 100644 --- a/index.php +++ b/index.php @@ -256,9 +256,8 @@ else } //clean unwanted error log -//TODO unify file name with PhpObject Class $sDebug = ob_get_clean(); -if(Settings::DEBUG && $sDebug!='') file_put_contents('log.html', print_r($sDebug, true)."\n\n", FILE_APPEND); +if(Settings::DEBUG && $sDebug!='') $oDatabap->addUncaughtError($sDebug); echo $sResult; //echo json_encode($sDebug);