diff --git a/module/bug/model.php b/module/bug/model.php index dfd5705ccd..4643862271 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2507,16 +2507,16 @@ class bugModel extends model public function printCell($col, $bug, $users, $builds, $branches, $modulePairs, $projects = array(), $plans = array(), $stories = array(), $tasks = array(), $mode = 'datatable') { /* Check the product is closed. */ - $changeAllowed = common::checkObjectChangeAllowed('bug', $bug); + $canBeChanged = common::checkObjectChangeAllowed('bug', $bug); - $canBatchEdit = ($changeAllowed and common::hasPriv('bug', 'batchEdit')); - $canBatchConfirm = ($changeAllowed and common::hasPriv('bug', 'batchConfirm')); + $canBatchEdit = ($canBeChanged and common::hasPriv('bug', 'batchEdit')); + $canBatchConfirm = ($canBeChanged and common::hasPriv('bug', 'batchConfirm')); $canBatchClose = common::hasPriv('bug', 'batchClose'); - $canBatchActivate = ($changeAllowed and common::hasPriv('bug', 'batchActivate')); - $canBatchChangeBranch = ($changeAllowed and common::hasPriv('bug', 'batchChangeBranch')); - $canBatchChangeModule = ($changeAllowed and common::hasPriv('bug', 'batchChangeModule')); - $canBatchResolve = ($changeAllowed and common::hasPriv('bug', 'batchResolve')); - $canBatchAssignTo = ($changeAllowed and common::hasPriv('bug', 'batchAssignTo')); + $canBatchActivate = ($canBeChanged and common::hasPriv('bug', 'batchActivate')); + $canBatchChangeBranch = ($canBeChanged and common::hasPriv('bug', 'batchChangeBranch')); + $canBatchChangeModule = ($canBeChanged and common::hasPriv('bug', 'batchChangeModule')); + $canBatchResolve = ($canBeChanged and common::hasPriv('bug', 'batchResolve')); + $canBatchAssignTo = ($canBeChanged and common::hasPriv('bug', 'batchAssignTo')); $canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo); @@ -2730,7 +2730,7 @@ class bugModel extends model break; case 'actions': $params = "bugID=$bug->id"; - if($changeAllowed) + if($canBeChanged) { common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true); common::printIcon('bug', 'resolve', $params, $bug, 'list', 'checked', '', 'iframe', true); diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index b37104f9d1..7b7d20c1df 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -211,15 +211,15 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow $widths = $this->datatable->setFixedFieldWidth($setting); $columns = 0; - $changeAllowed = (empty($config->global->closedProductStatus) or $product->status != 'closed'); - $canBatchEdit = ($changeAllowed and common::hasPriv('bug', 'batchEdit')); - $canBatchConfirm = ($changeAllowed and common::hasPriv('bug', 'batchConfirm')); + $canBeChanged = (empty($config->global->closedProductStatus) or $product->status != 'closed'); + $canBatchEdit = ($canBeChanged and common::hasPriv('bug', 'batchEdit')); + $canBatchConfirm = ($canBeChanged and common::hasPriv('bug', 'batchConfirm')); $canBatchClose = common::hasPriv('bug', 'batchClose'); - $canBatchActivate = ($changeAllowed and common::hasPriv('bug', 'batchActivate')); - $canBatchChangeBranch = ($changeAllowed and common::hasPriv('bug', 'batchChangeBranch')); - $canBatchChangeModule = ($changeAllowed and common::hasPriv('bug', 'batchChangeModule')); - $canBatchResolve = ($changeAllowed and common::hasPriv('bug', 'batchResolve')); - $canBatchAssignTo = ($changeAllowed and common::hasPriv('bug', 'batchAssignTo')); + $canBatchActivate = ($canBeChanged and common::hasPriv('bug', 'batchActivate')); + $canBatchChangeBranch = ($canBeChanged and common::hasPriv('bug', 'batchChangeBranch')); + $canBatchChangeModule = ($canBeChanged and common::hasPriv('bug', 'batchChangeModule')); + $canBatchResolve = ($canBeChanged and common::hasPriv('bug', 'batchResolve')); + $canBatchAssignTo = ($canBeChanged and common::hasPriv('bug', 'batchAssignTo')); $canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo); ?> diff --git a/module/build/control.php b/module/build/control.php index ee60eb135f..329160c247 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -213,7 +213,7 @@ class build extends control if(!$build) die(js::error($this->lang->notFound) . js::locate('back')); /* Determines whether an object is editable. */ - $changeAllowed = common::checkObjectChangeAllowed('build', $build); + $canBeChanged = common::checkObjectChangeAllowed('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,18 +261,18 @@ class build extends control $this->executeHooks($buildID); /* Assign. */ - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->build = $build; - $this->view->buildPairs = $this->build->getProjectBuildPairs($build->project, 0, 0, 'noempty,notrunk'); - $this->view->actions = $this->loadModel('action')->getList('build', $buildID); - $this->view->link = $link; - $this->view->param = $param; - $this->view->orderBy = $orderBy; - $this->view->bugs = $bugs; - $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->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->build = $build; + $this->view->buildPairs = $this->build->getProjectBuildPairs($build->project, 0, 0, 'noempty,notrunk'); + $this->view->actions = $this->loadModel('action')->getList('build', $buildID); + $this->view->link = $link; + $this->view->param = $param; + $this->view->orderBy = $orderBy; + $this->view->bugs = $bugs; + $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(); } diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php index bd53d2f43f..3da4c2abb6 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;}