diff --git a/module/build/control.php b/module/build/control.php index 745306a61f..36f4ea9d61 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -212,6 +212,9 @@ class build extends control $build = $this->build->getById((int)$buildID, true); if(!$build) die(js::error($this->lang->notFound) . js::locate('back')); + /* Determines whether an object is editable. */ + $changeAllowed = !common::checkParentObjectClosed('build', $build); + $product = $this->loadModel('product')->getById($build->product); if($product->type != 'normal') $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]); @@ -269,6 +272,7 @@ class build extends control $this->view->type = $type; $this->view->bugPager = $bugPager; $this->view->branchName = $build->productType == 'normal' ? '' : $this->loadModel('branch')->getById($build->branch); + $this->view->changeAllowed = $changeAllowed; $this->display(); } diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php index da89fa4ad9..bd53d2f43f 100644 --- a/module/build/view/view.html.php +++ b/module/build/view/view.html.php @@ -48,7 +48,7 @@ tbody tr td:first-child input{display:none;}