From 749e66ba25b6e83d4c3d85438ffce59513b7437e Mon Sep 17 00:00:00 2001 From: liugang Date: Tue, 8 Jul 2025 10:11:50 +0800 Subject: [PATCH 1/2] - [refac] remove duplicate code which was implementd in the processTask method. --- module/task/model.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/module/task/model.php b/module/task/model.php index c91b14e219..f780233e5a 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -1400,8 +1400,6 @@ class taskModel extends model $task = $this->loadModel('file')->replaceImgURL($task, 'desc'); $task->files = $this->file->getByObject('task', $taskID); if($setImgSize && $task->desc) $task->desc = $this->file->setImgSize($task->desc); - /* Get related test cases. */ - if($task->story) $task->cases = $this->dao->select('id, title')->from(TABLE_CASE)->where('story')->eq($task->story)->andWhere('storyVersion')->eq($task->storyVersion)->andWhere('deleted')->eq('0')->fetchPairs(); /* Process a task, compute its progress and get its related information. */ return $this->processTask($task, false); From 4e6bd54235b42ea2dbc9643a0d16d427ff1ba578 Mon Sep 17 00:00:00 2001 From: liugang Date: Tue, 8 Jul 2025 13:16:11 +0800 Subject: [PATCH 2/2] * [refac] wrap MySQL8 keywords in backticks. --- module/block/zen.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/block/zen.php b/module/block/zen.php index 4e698bb911..55a16cb3c6 100644 --- a/module/block/zen.php +++ b/module/block/zen.php @@ -2471,7 +2471,7 @@ class blockZen extends block $involveds = $this->product->getOrderedProducts('involved', 0, 0, 'all'); $productIdList = array_merge(array_keys($products), array_keys($involveds)); - $stmt = $this->dao->select('id,product,lib,title,type,addedBy,addedDate,editedDate,status,acl,groups,readGroups,users,readUsers,deleted')->from(TABLE_DOC)->alias('t1') + $stmt = $this->dao->select('id,product,lib,title,type,addedBy,addedDate,editedDate,status,acl,`groups`,readGroups,users,readUsers,deleted')->from(TABLE_DOC)->alias('t1') ->where('deleted')->eq(0) ->andWhere('product')->in($productIdList) ->beginIF($this->config->doc->notArticleType)->andWhere('t1.type')->notIN($this->config->doc->notArticleType)->fi()