* finish task #1976.

This commit is contained in:
wangyidong
2014-07-28 07:56:52 +00:00
parent 5cb4f543a2
commit 5696caf06f
2 changed files with 8 additions and 4 deletions
+6 -2
View File
@@ -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, "<?php\n die();\n?>\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, "<?php\n die();\n?>\n");
$fh = @fopen($sqlLog, 'a');
if(!$fh) return false;
fwrite($fh, date('Ymd H:i:s') . ": " . $this->getURI() . "\n");
+2 -2
View File
@@ -133,8 +133,8 @@ js::set('refresh', $lang->refresh);
<td colspan='2'>
<?php
echo html::submitButton() . html::backButton();
echo html::hidden('case', $caseID) . html::hidden('caseVersion', $version);
echo html::hidden('result', $runID) . html::hidden('testtask', $testtask);
echo html::hidden('case', (int)$caseID) . html::hidden('caseVersion', (int)$version);
echo html::hidden('result', (int)$runID) . html::hidden('testtask', (int)$testtask);
?>
</td>
</tr>