* finish task #6616.

This commit is contained in:
wangyidong
2019-12-06 13:50:47 +08:00
parent 845ff37b23
commit f77442271e
4 changed files with 11 additions and 8 deletions
+9
View File
@@ -464,6 +464,14 @@ class bugModel extends model
->where('t1.id')->eq((int)$bugID)->fetch();
if(!$bug) return false;
if($bug->project and !$this->loadModel('project')->checkPriv($bug->project))
{
echo(js::alert($this->lang->bug->projectAccessDenied));
$loginLink = $this->config->requestType == 'GET' ? "?{$this->config->moduleVar}=user&{$this->config->methodVar}=login" : "user{$this->config->requestFix}login";
if(strpos($this->server->http_referer, $loginLink) !== false) die(js::locate(inlink('index')));
die(js::locate('back'));
}
$bug = $this->loadModel('file')->replaceImgURL($bug, 'steps');
if($setImgSize) $bug->steps = $this->file->setImgSize($bug->steps);
foreach($bug as $key => $value) if(strpos($key, 'Date') !== false and !(int)substr($value, 0, 4)) $bug->$key = '';
@@ -2297,6 +2305,7 @@ class bugModel extends model
if(strpos($bugQuery, '`closedDate`') !== false) $bugQuery .= " AND `closedDate` != '0000-00-00 00:00:00'";
$bugs = $this->dao->select('*')->from(TABLE_BUG)->where($bugQuery)
->andWhere('project')->in($this->app->user->view->projects)
->andWhere('deleted')->eq(0)
->orderBy($orderBy)->page($pager)->fetchAll();
return $bugs;