From 7b5768932c13f32f833efe19264f48ee1db47735 Mon Sep 17 00:00:00 2001 From: wangyidong Date: Mon, 28 Jan 2019 15:52:17 +0800 Subject: [PATCH 1/2] * fix for backup. --- module/backup/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/backup/model.php b/module/backup/model.php index 9cabd4e649..f275209f1c 100644 --- a/module/backup/model.php +++ b/module/backup/model.php @@ -284,7 +284,7 @@ class backupModel extends model public function getBackupPath() { $backupPath = empty($this->config->backup->settingDir) ? $this->app->getTmpRoot() . 'backup' . DS : $this->config->backup->settingDir; - return trim(str_replace('\\', '/', $backupPath), '/') . '/'; + return rtrim(str_replace('\\', '/', $backupPath), '/') . '/'; } /** From cf27f925ac4c95d77f365b059554af2aeaa33b2a Mon Sep 17 00:00:00 2001 From: Yagami Date: Mon, 28 Jan 2019 15:55:56 +0800 Subject: [PATCH 2/2] * Fix project modules. --- module/tree/model.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/module/tree/model.php b/module/tree/model.php index 89d5e06b10..cab96125eb 100644 --- a/module/tree/model.php +++ b/module/tree/model.php @@ -508,7 +508,8 @@ class treeModel extends model $fullTrees = array(); foreach($products as $id => $product) { - $productInfo = $this->product->getById($id); + $linkedStory = $this->dao->select('*')->from(TABLE_PROJECTSTORY)->where('project')->eq($rootID)->andWhere('product')->eq($id)->fetch(); + $productInfo = $this->product->getById($id); /* tree menu. */ $productTree = array(); $branchTrees = array(); @@ -520,7 +521,7 @@ class treeModel extends model ->orderBy('grade desc, type, `order`') ->get(); $stmt = $this->dbh->query($query); - if($branch == 0) $productTree = $this->getDataStructure($stmt, 'task', $projectModules); + if($branch == 0 and $linkedStory) $productTree = $this->getDataStructure($stmt, 'task', $projectModules); if($branch != 0) { $children = $this->getDataStructure($stmt, 'task', $projectModules);