From c8cf8ce440c07b1afc928329074c237862bb75c8 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Tue, 17 Nov 2020 16:28:27 +0800 Subject: [PATCH] * Finish task #8382. --- module/build/control.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/module/build/control.php b/module/build/control.php index eb8f4f6a2a..c605570476 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -212,9 +212,6 @@ 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. */ - $canBeChanged = common::canBeChanged('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]); @@ -261,6 +258,7 @@ class build extends control $this->executeHooks($buildID); /* Assign. */ + $this->view->canBeChanged = common::canBeChanged('build', $build); // Determines whether an object is editable. $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->build = $build; $this->view->buildPairs = $this->build->getProjectBuildPairs($build->project, 0, 0, 'noempty,notrunk'); @@ -272,7 +270,6 @@ 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->canBeChanged = $canBeChanged; $this->display(); }