* fix bug for show task module.

This commit is contained in:
wangyidong
2020-03-24 16:52:54 +08:00
parent fe4cd3fd3e
commit d09eb3aff5
+2
View File
@@ -534,6 +534,7 @@ class treeModel extends model
{
$extra['tip'] = false;
$stmt = $this->dbh->query($this->buildMenuQuery($rootID, 'task', $startModule = 0));
if(empty($projects) and isset($this->config->project->task->allModule)) $this->config->project->task->allModule = 1;
return $this->getDataStructure($stmt, 'task');
}
@@ -1733,6 +1734,7 @@ class treeModel extends model
/* Ignore useless module for task. */
$allModule = (isset($this->config->project->task->allModule) and ($this->config->project->task->allModule == 1));
if($keepModules and !isset($keepModules[$module->id]) and !$allModule) continue;
if($viewType == 'task' and empty($keepModules) and !$allModule) continue;
if(isset($parent[$module->id]))
{
$module->children = $parent[$module->id]->children;