* bugModel: load the fileModel when call its method instead of load it in a single statement.

This commit is contained in:
liugang
2023-11-08 10:30:00 +08:00
parent 289bbad610
commit 48f436a335
+1 -2
View File
@@ -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');