* finish task #6650.

This commit is contained in:
wangyidong
2019-12-05 09:13:32 +08:00
parent a4cf41780c
commit 3d68e30c67
3 changed files with 44 additions and 4 deletions
+3 -2
View File
@@ -1408,8 +1408,9 @@ class treeModel extends model
{
$module = fixer::input('post')->get();
$self = $this->getById($moduleID);
if(!isset($_POST['branch'])) $module->branch = $self->branch;
$repeatName = $this->checkUnique($self, array("id{$self->id}" => $module->name), array("id{$self->id}" => $self->branch));
$repeatName = $this->checkUnique($self, array("id{$self->id}" => $module->name), array("id{$self->id}" => $module->branch));
if($repeatName) die(js::alert(sprintf($this->lang->tree->repeatName, $repeatName)));
$parent = $this->getById($this->post->parent);
@@ -1717,7 +1718,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])) continue;
if($keepModules and !isset($keepModules[$module->id]) and !$allModule) continue;
if($viewType == 'task' and empty($keepModules) and !$allModule) continue;
if(isset($parent[$module->id]))
{