From 5696caf06f6f856c89b1df29eb4eaec8fe0bd394 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 28 Jul 2014 07:56:52 +0000 Subject: [PATCH] * finish task #1976. --- framework/router.class.php | 8 ++++++-- module/bug/view/create.html.php | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/framework/router.class.php b/framework/router.class.php index d2e139d951..28a1e23099 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -1603,7 +1603,9 @@ class router } /* Save to log file. */ - $errorFile = $this->getLogRoot() . 'php.' . date('Ymd') . '.log'; + $errorFile = $this->getLogRoot() . 'php.' . date('Ymd') . '.log.php'; + if(!is_file($errorFile)) file_put_contents($errorFile, "\n"); + $fh = @fopen($errorFile, 'a'); if($fh) fwrite($fh, strip_tags($errorLog)) && fclose($fh); @@ -1641,7 +1643,9 @@ class router { if(!class_exists('dao')) return; - $sqlLog = $this->getLogRoot() . 'sql.' . date('Ymd') . '.log'; + $sqlLog = $this->getLogRoot() . 'sql.' . date('Ymd') . '.log.php'; + if(!is_file($sqlLog)) file_put_contents($sqlLog, "\n"); + $fh = @fopen($sqlLog, 'a'); if(!$fh) return false; fwrite($fh, date('Ymd H:i:s') . ": " . $this->getURI() . "\n"); diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index 7e4935dc4f..d049c22288 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -133,8 +133,8 @@ js::set('refresh', $lang->refresh);