From 3fda25f7c0c7345e57980a3c8495459ea459efea Mon Sep 17 00:00:00 2001 From: sunguangming Date: Mon, 18 Aug 2025 07:07:17 +0000 Subject: [PATCH] * For sonar. --- extension/lite/my/ext/model/lite.php | 5 ++++- module/my/model.php | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/extension/lite/my/ext/model/lite.php b/extension/lite/my/ext/model/lite.php index 421a1cdddb..b9fcefeaf5 100644 --- a/extension/lite/my/ext/model/lite.php +++ b/extension/lite/my/ext/model/lite.php @@ -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; diff --git a/module/my/model.php b/module/my/model.php index fa719284d9..4541e12b09 100644 --- a/module/my/model.php +++ b/module/my/model.php @@ -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;