From 3fb390115c93062be8ece6db00c2ac5caad25e1a Mon Sep 17 00:00:00 2001 From: wangyuting2 <851424971@qq.com> Date: Wed, 8 Jun 2022 14:23:42 +0800 Subject: [PATCH] * Add processing of datasource viewType. --- module/tree/control.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/module/tree/control.php b/module/tree/control.php index 6ba17a19fe..2b953d2f6b 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -229,6 +229,27 @@ class tree extends control $title = $this->lang->tree->manageTrainpost; $position[] = $this->lang->tree->manageTrainpost; } + elseif(strpos($viewType, 'datasource') !== false) + { + $params = explode('_', $viewType); + if(count($params) == 2) + { + $datasourceID = $params[1]; + $manageChild = 'manage' . ucfirst($viewType) . 'Child'; + $datasource = $this->loadModel('workflowdatasource', 'flow')->getByID($datasourceID); + if($datasource) + { + $title = $datasource->name; + $position[] = $datasource->name; + + $this->lang->tree->$manageChild = $title; + + $root = new stdclass(); + $root->name = $title; + $this->view->root = $root; + } + } + } $parentModules = $this->tree->getParents($currentModuleID); $this->view->title = $title;