* For sonar.

This commit is contained in:
sunguangming
2025-08-18 08:27:06 +00:00
parent 8ee432db29
commit 3fda25f7c0
2 changed files with 12 additions and 3 deletions
+4 -1
View File
@@ -27,7 +27,10 @@ public function getReviewingStories(string $orderBy = 'id_desc', bool $checkExis
->beginIF($checkExists)->limit(1)->fi()
->fetchAll();
if($checkExists) return !empty($stories);
if($checkExists)
{
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;
+8 -2
View File
@@ -1052,7 +1052,10 @@ class myModel extends model
->beginIF($checkExists)->limit(1)->fi()
->fetchAll('id');
if($checkExists) return !empty($demands);
if($checkExists)
{
return !empty($demands);
}
$actions = $this->dao->select('objectID, `date`')->from(TABLE_ACTION)->where('objectType')->eq('demand')->andWhere('objectID')->in(array_keys($demands))->andWhere('action')->eq('submitreview')->orderBy('`date`')->fetchPairs('objectID', 'date');
foreach($actions as $demandID => $date) $demands[$demandID]->time = $date;
@@ -1084,7 +1087,10 @@ class myModel extends model
->beginIF($checkExists)->limit(1)->fi()
->fetchAll();
if($checkExists) return !empty($stories);
if($checkExists)
{
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;