* fix bugs.

This commit is contained in:
wangyidong
2017-07-17 16:49:59 +08:00
parent 152daa4c39
commit 9b863fe982
8 changed files with 22 additions and 16 deletions
+1 -1
View File
@@ -2236,7 +2236,7 @@ class baseRouter
* Set the error info.
**/
$errorLog = "\n" . date('H:i:s') . " $message in <strong>$file</strong> on line <strong>$line</strong> ";
$errorLog .= "when visiting <strong>" . $this->getURI() . "</strong>\n";
$errorLog .= "when visiting <strong>" . htmlspecialchars($this->getURI()) . "</strong>\n";
/*
* 为了安全起见,对公网环境隐藏脚本路径。
+1 -1
View File
@@ -588,7 +588,7 @@ class bugModel extends model
}
/* Initialize bugs from the post data.*/
$oldBugs = $bugIDList ? $this->getList($bugIDList) : array();
$oldBugs = $bugIDList ? $this->getByList($bugIDList) : array();
foreach($bugIDList as $bugID)
{
$oldBug = $oldBugs[$bugID];
+7 -7
View File
@@ -27,25 +27,25 @@
<th><?php echo $lang->install->phpVersion;?></th>
<td><?php echo $phpVersion;?></td>
<td class='<?php echo $phpResult;?>'><?php echo $lang->install->$phpResult;?></td>
<td class='a-left f-12px'><?php if($phpResult == 'fail') echo $lang->install->phpFail;?></td>
<td class='text-left f-12px'><?php if($phpResult == 'fail') echo $lang->install->phpFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->pdo;?></th>
<td><?php $pdoResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
<td class='<?php echo $pdoResult;?>'><?php echo $lang->install->$pdoResult;?></td>
<td class='a-left f-12px'><?php if($pdoResult == 'fail') echo $lang->install->pdoFail;?></td>
<td class='text-left f-12px'><?php if($pdoResult == 'fail') echo $lang->install->pdoFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->pdoMySQL;?></th>
<td><?php $pdoMySQLResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
<td class='<?php echo $pdoMySQLResult;?>'><?php echo $lang->install->$pdoMySQLResult;?></td>
<td class='a-left f-12px'><?php if($pdoMySQLResult == 'fail') echo $lang->install->pdoMySQLFail;?></td>
<td class='text-left f-12px'><?php if($pdoMySQLResult == 'fail') echo $lang->install->pdoMySQLFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->json;?></th>
<td><?php $jsonResult == 'ok' ? printf($lang->install->loaded) : printf($lang->install->unloaded);?></td>
<td class='<?php echo $jsonResult;?>'><?php echo $lang->install->$jsonResult;?></td>
<td class='a-left f-12px'><?php if($jsonResult == 'fail') echo $lang->install->jsonFail;?></td>
<td class='text-left f-12px'><?php if($jsonResult == 'fail') echo $lang->install->jsonFail;?></td>
</tr>
<tr>
<th><?php echo $lang->install->tmpRoot;?></th>
@@ -58,7 +58,7 @@
?>
</td>
<td class='<?php echo $tmpRootResult;?>'><?php echo $lang->install->$tmpRootResult;?></td>
<td class='a-left f-12px'>
<td class='text-left f-12px'>
<?php
if(!$tmpRootInfo['exists']) printf($mkdir, $tmpRootInfo['path'], $tmpRootInfo['path']);
if(!$tmpRootInfo['writable']) printf($chmod, $tmpRootInfo['path'], $tmpRootInfo['path']);
@@ -74,7 +74,7 @@
?>
</td>
<td class='<?php echo $dataRootResult;?>'><?php echo $lang->install->$dataRootResult;?></td>
<td class='a-left f-12px'>
<td class='text-left f-12px'>
<?php
if(!$dataRootInfo['exists']) printf($mkdir, $dataRootInfo['path'], $dataRootInfo['path']);
if(!$dataRootInfo['writable']) printf($chmod, $dataRootInfo['path'], $dataRootInfo['path']);
@@ -91,7 +91,7 @@
?>
</td>
<td class='<?php echo $sessionResult;?>'><?php echo $lang->install->$sessionResult;?></td>
<td class='a-left f-12px'>
<td class='text-left f-12px'>
<?php
if($sessionInfo['path'])
{
+1 -1
View File
@@ -111,7 +111,7 @@
</td>
<td><?php echo $lang->testcase->typeList[$case->type];?></td>
<td><?php echo $users[$case->openedBy];?></td>
<td><?php echo $case->lastRunner;?></td>
<td><?php echo $users[$case->lastRunner];?></td>
<td><?php if(!helper::isZeroDate($case->lastRunDate)) echo date(DT_MONTHTIME1, strtotime($case->lastRunDate));?></td>
<td class='<?php echo $case->lastRunResult;?>'><?php if($case->lastRunResult) echo $lang->testcase->resultList[$case->lastRunResult];?></td>
<td class='case-<?php echo $case->status?>'><?php echo $lang->testcase->statusList[$case->status];?></td>
+1 -1
View File
@@ -47,7 +47,7 @@
<td class='w-60px'><?php if(!empty($result->files)) echo html::a("#caseResult{$result->id}", $lang->files . $fileCount, '', "data-toggle='modal' data-type='iframe'")?></td>
<td class='w-50px text-center'><i class='collapse-handle icon-chevron-down text-muted'></i></td>
</tr>
<?php $params = isset($testtask) ? "testtask=$testtask->id,projectID=$testtask->project,buildID=$testtask->build" : '';?>
<?php $params = isset($testtask) ? ",testtask=$testtask->id,projectID=$testtask->project,buildID=$testtask->build" : '';?>
<tr class='result-detail hide' id='tr-detail_<?php echo $trCount++; ?>'>
<td colspan='7' class='pd-0'>
<form action='<?php echo $this->createLink('bug', 'create', "product=$case->product&branch=$case->branch&extras=caseID=$case->id,version=$case->version,resultID=$result->id,runID=$runID" . $params)?>' target='_blank' method='post'>
+7 -3
View File
@@ -36,10 +36,14 @@ function loadList(type, id)
if(type == 'bug' || type == 'task')
{
$.get(link,function(data,status) {
if(data) {
$.get(link, function(data, status)
{
if(data)
{
$(divClass).html(data);
} else {
}
else
{
alert(noTodo);
$("#type").val("custom");
$(divClass).html($(divID).html());
+1
View File
@@ -12,6 +12,7 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::set('noTodo', $lang->todo->noTodo);?>
<div id='titlebar'>
<div class='heading'>
<span class='prefix'><?php echo html::icon($lang->icons['todo']);?></span>
+3 -2
View File
@@ -704,6 +704,7 @@ class userModel extends model
$projectAllow = false;
foreach($groups as $group)
{
$acl = json_decode($group->acl, true);
if(empty($group->acl))
{
$productAllow = true;
@@ -711,9 +712,9 @@ class userModel extends model
$viewAllow = true;
break;
}
$acl = json_decode($group->acl, true);
if(empty($acl['products'])) $productAllow = true;
if(empty($acl['projects'])) $projectAllow = true;
if(empty($acl['views'])) $viewAllow = true;
if(empty($acls) and !empty($acl))
{
$acls = $acl;
@@ -727,7 +728,7 @@ class userModel extends model
if($productAllow) $acls['products'] = array();
if($projectAllow) $acls['projects'] = array();
if($viewAllow) $acls = array();
if($viewAllow) $acls['views'] = array();
$sql = $this->dao->select('module, method')->from(TABLE_USERGROUP)->alias('t1')->leftJoin(TABLE_GROUPPRIV)->alias('t2')
->on('t1.group = t2.group')