From 48f436a3357916258d0a492d4f445a7eae9ec6e5 Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 8 Nov 2023 10:30:00 +0800 Subject: [PATCH] * bugModel: load the fileModel when call its method instead of load it in a single statement. --- module/bug/model.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index 2ab525510d..5a6ba1c352 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -167,10 +167,9 @@ class bugModel extends model $bug = parent::fetchByID($bugID); if(!$bug) return false; - $this->loadModel('file'); $this->loadModel('mr'); - $bug = $this->file->replaceImgURL($bug, 'steps'); + $bug = $this->loadModel('file')->replaceImgURL($bug, 'steps'); if($setImgSize) $bug->steps = $this->file->setImgSize($bug->steps); if($bug->project) $bug->projectName = $this->bugTao->getNameFromTable($bug->project, TABLE_PROJECT, 'name');