From bb17fc804e7015151a0982a58baae662e1a49cc0 Mon Sep 17 00:00:00 2001 From: lanzongjun Date: Tue, 6 Sep 2022 15:46:23 +0800 Subject: [PATCH] * sync product --- module/tree/model.php | 3 ++- module/upgrade/model.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/tree/model.php b/module/tree/model.php index 8c8a2582ec..43c85c74c0 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -99,7 +99,8 @@ class treeModel extends model /* $createdVersion < 4.1 or $type == 'story'. */ return $this->dao->select('*')->from(TABLE_MODULE) - ->where('root')->eq((int)$rootID) + ->where('1=1') + ->beginIF($type != 'feedback' and !empty($rootID))->andwhere('root')->eq((int)$rootID)->fi() ->andWhere('type')->eq($type) ->beginIF($startModulePath)->andWhere('path')->like($startModulePath)->fi() ->beginIF($branch !== 'all' and $branch !== '' and $branch !== false) diff --git a/module/upgrade/model.php b/module/upgrade/model.php index aebb700555..48ccdb7bee 100644 --- a/module/upgrade/model.php +++ b/module/upgrade/model.php @@ -7283,7 +7283,7 @@ class upgradeModel extends model /* * Process feedback module - * + * * @access public * @return void */ @@ -7313,7 +7313,7 @@ class upgradeModel extends model if(isset($relation[$path])) $newPaths[] = $relation[$path]; } $newPaths = join(',', $newPaths); - $parent = !empty($module->parent) and isset($relation[$module->parent]) ? $relation[$module->parent] : 0; + $parent = !empty($module->parent) ? $relation[$module->parent] : 0; $this->dao->update(TABLE_MODULE)->set('path')->eq($newPaths)->set('parent')->eq($parent)->where('id')->eq($newModuleID)->exec(); } }