From 5285fa44feb7b92442e3d4e69597e5fb8848aa53 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Wed, 10 Aug 2022 16:37:04 +0800 Subject: [PATCH] * Fix bug #26189. --- module/build/control.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/module/build/control.php b/module/build/control.php index df9d5102d1..d8abb4dfff 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -245,11 +245,10 @@ class build extends control /* Get stories and stages. */ $storyPager = new pager($type == 'story' ? $recTotal : 0, $recPerPage, $type == 'story' ? $pageID : 1); - $stories = $this->dao->select('t1.*, t2.stage')->from(TABLE_STORY)->alias('t1') - ->leftJoin(TABLE_STORYSTAGE)->alias('t2')->on('t1.id = t2.story') - ->where('t1.id')->in($build->stories) - ->andWhere('t1.deleted')->eq(0) - ->beginIF($type == 'story')->orderBy("t1.$orderBy")->fi() + $stories = $this->dao->select('*')->from(TABLE_STORY) + ->where('id')->in($build->stories) + ->andWhere('deleted')->eq(0) + ->beginIF($type == 'story')->orderBy($orderBy)->fi() ->page($storyPager) ->fetchAll('id');