diff --git a/module/bug/model.php b/module/bug/model.php index 887dd0ef67..847b1eac10 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2508,7 +2508,7 @@ 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. */ - $canBeChanged = common::checkObjectChangeAllowed('bug', $bug); + $canBeChanged = common::canBeChanged('bug', $bug); $canBatchEdit = ($canBeChanged and common::hasPriv('bug', 'batchEdit')); $canBatchConfirm = ($canBeChanged and common::hasPriv('bug', 'batchConfirm')); diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index 540516b9cb..d17743d7d6 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -58,7 +58,7 @@ fetch('file', 'printFiles', array('files' => $bug->files, 'fieldset' => 'true', 'object' => $bug));?> - createLink('action', 'comment', "objectType=bug&objectID=$bug->id");?> + createLink('action', 'comment', "objectType=bug&objectID=$bug->id");?> printExtendFields($bug, 'div', "position=left&inForm=0&inCell=1");?>
diff --git a/module/build/control.php b/module/build/control.php index 329160c247..eb8f4f6a2a 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. */ - $canBeChanged = common::checkObjectChangeAllowed('build', $build); + $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]); diff --git a/module/common/model.php b/module/common/model.php index aed653968a..d26cc7001f 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1490,7 +1490,7 @@ EOD; global $app, $lang; /* Check the parent object is closed. */ - if(strpos('close|batchClose', $method) === false and !commonModel::checkObjectChangeAllowed($module, $object)) return false; + if(strpos('close|batchClose', $method) === false and !commonModel::canBeChanged($module, $object)) return false; /* Check is the super admin or not. */ if(!empty($app->user->admin) || strpos($app->company->admins, ",{$app->user->account},") !== false) return true; @@ -1842,7 +1842,7 @@ EOD; } /** - * Check the parent object is closed. + * Check the object can be changed. * * @param string $module * @param object $object @@ -1850,7 +1850,7 @@ EOD; * @access public * @return bool */ - public static function checkObjectChangeAllowed($module, $object = null) + public static function canBeChanged($module, $object = null) { global $app, $config; diff --git a/module/doc/model.php b/module/doc/model.php index 69c52605e0..c334b329f7 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -111,7 +111,7 @@ class docModel extends model $docLib = new stdClass(); $docLib->product = $productID; $docLib->project = $projectID; - $canBeChanged = common::checkObjectChangeAllowed('doc', $docLib); + $canBeChanged = common::canBeChanged('doc', $docLib); $lib = isset($lib) ? $lib : new stdClass(); $actions = $this->setFastMenu($fastLib); diff --git a/module/doc/view/browse.html.php b/module/doc/view/browse.html.php index 4c0978103c..77a774f54f 100644 --- a/module/doc/view/browse.html.php +++ b/module/doc/view/browse.html.php @@ -42,7 +42,7 @@ var browseType = ''; ", '', "title='{$lang->doc->browseTypeList['grid']}' class='btn btn-icon'");?> ", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon text-primary'");?> - +