From 8e415b38cbff1a0a9e3ef2db1b8049da199e9d13 Mon Sep 17 00:00:00 2001 From: mayue Date: Thu, 19 May 2022 07:45:02 +0000 Subject: [PATCH] * Fix bug #22639. --- module/productplan/model.php | 3 +-- module/productplan/view/edit.html.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/module/productplan/model.php b/module/productplan/model.php index e7ddf6f878..9de298b65c 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -497,7 +497,6 @@ class productplanModel extends model $plan = fixer::input('post')->stripTags($this->config->productplan->editor->edit['id'], $this->config->allowedTags) ->setIF($this->post->future or empty($_POST['begin']), 'begin', $this->config->productplan->future) ->setIF($this->post->future or empty($_POST['end']), 'end', $this->config->productplan->future) - ->setIF(!isset($_POST['parent']), 'parent', -1) ->add('id', $planID) ->remove('delta,uid,future') ->get(); @@ -516,7 +515,7 @@ class productplanModel extends model if($plan->end !== $this->config->productplan->future and $plan->end > $parentPlan->end) dao::$errors['end'] = sprintf($this->lang->productplan->endGreaterParent, $parentPlan->end); } } - elseif($plan->parent == -1 and $plan->begin != $this->config->productplan->future) + elseif($oldPlan->parent == -1 and $plan->begin != $this->config->productplan->future) { $childPlans = $this->getChildren($oldPlan->id); $minBegin = $plan->begin; diff --git a/module/productplan/view/edit.html.php b/module/productplan/view/edit.html.php index ca8c0cf8ca..5ffab0ae95 100644 --- a/module/productplan/view/edit.html.php +++ b/module/productplan/view/edit.html.php @@ -39,7 +39,7 @@ productplan->title;?> title, "class='form-control' required");?> - parent == '-1' ? class='hidden': '';?>> + parent == '-1' ? "class='hidden'": '';?>> productplan->parent;?> '') + $parentPlanPairs, $plan->parent, "class='form-control chosen'");?>