* [bug#64871,done,0.2h] fix bug.

This commit is contained in:
sunguangming
2025-08-28 04:03:23 +00:00
parent fa08f90cde
commit e9701ada2a
2 changed files with 5 additions and 3 deletions
+4 -2
View File
@@ -32,7 +32,9 @@ public function getReviewingStories(string $orderBy = 'id_desc', bool $checkExis
return !empty($stories);
}
$actions = $this->dao->select('objectID,`date`')->from(TABLE_ACTION)->where('objectType')->eq('story')->andWhere('objectID')->in(array_keys($stories))->andWhere('action')->eq('submitreview')->orderBy('`date`')->fetchPairs();
foreach($actions as $storyID => $date) $stories[$storyID]->time = $date;
$actions = $this->dao->select('objectID,`date`')->from(TABLE_ACTION)->where('objectType')->eq('story')->andWhere('objectID')->in(array_keys($stories))->andWhere('action')->eq('submitreview')->orderBy('`date`')->fetchPairs();
$projects = $this->dao->select('story,project')->from(TABLE_PROJECTSTORY)->where('story')->in(array_keys($stories))->fetchPairs();
foreach($projects as $storyID => $projectID) $stories[$storyID]->project = $projectID;
foreach($actions as $storyID => $date) $stories[$storyID]->time = $date;
return array_values($stories);
}
+1 -1
View File
@@ -1083,7 +1083,7 @@ class myModel extends model
public function getReviewingStories(string $orderBy = 'id_desc', bool $checkExists = false, $type = 'story'): array|bool
{
$this->app->loadLang($type);
$stories = $this->dao->select("t1.id, t1.title, 'story' AS type, t1.openedDate AS time, t1.status, t1.product, 0 AS project, t1.parent")->from(TABLE_STORY)->alias('t1')
$stories = $this->dao->select("t1.id, t1.title, 'story' AS type, t1.type AS storyType, t1.openedDate AS time, t1.status, t1.product, 0 AS project, t1.parent")->from(TABLE_STORY)->alias('t1')
->leftJoin(TABLE_STORYREVIEW)->alias('t2')->on('t1.id = t2.story and t1.version = t2.version')
->where('t1.deleted')->eq(0)
->beginIF(!$this->app->user->admin)->andWhere('t1.product')->in($this->app->user->view->products)->fi()