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'");?> - + - + diff --git a/module/my/view/bug.html.php b/module/my/view/bug.html.php index beb4899cd3..a05cc1336d 100644 --- a/module/my/view/bug.html.php +++ b/module/my/view/bug.html.php @@ -73,7 +73,7 @@ ?> - + diff --git a/module/my/view/story.html.php b/module/my/view/story.html.php index 860cc550a1..86bdf366f3 100644 --- a/module/my/view/story.html.php +++ b/module/my/view/story.html.php @@ -64,7 +64,7 @@ createLink('story', 'view', "id=$story->id"); - $canBeChanged = common::checkObjectChangeAllowed('story', $story); + $canBeChanged = common::canBeChanged('story', $story); ?> diff --git a/module/my/view/task.html.php b/module/my/view/task.html.php index 3d472fb57a..1460409a22 100644 --- a/module/my/view/task.html.php +++ b/module/my/view/task.html.php @@ -61,7 +61,7 @@ - + diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php index 0b84fc312f..736899b7eb 100644 --- a/module/my/view/testcase.html.php +++ b/module/my/view/testcase.html.php @@ -69,7 +69,7 @@ case : $case->id; $runID = $type == 'assigntome' ? $case->id : 0; - $canBeChanged = common::checkObjectChangeAllowed('testcase', $case); + $canBeChanged = common::canBeChanged('testcase', $case); ?> diff --git a/module/productplan/control.php b/module/productplan/control.php index c85fb01f13..55482e9721 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -250,7 +250,7 @@ class productplan extends control $this->session->set('bugList', $this->app->getURI(true) . '&type=' . 'bug'); /* Determines whether an object is editable. */ - $canBeChanged = common::checkObjectChangeAllowed('plan', $plan); + $canBeChanged = common::canBeChanged('plan', $plan); /* Load pager. */ $this->app->loadClass('pager', $static = true); diff --git a/module/productplan/view/browse.html.php b/module/productplan/view/browse.html.php index 68e197cac0..7c732cfa8a 100644 --- a/module/productplan/view/browse.html.php +++ b/module/productplan/view/browse.html.php @@ -75,7 +75,7 @@ loadModel('file');?> file->replaceImgURL($plan, 'desc'); diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php index dc3bf5a839..c94559635d 100644 --- a/module/project/view/bug.html.php +++ b/module/project/view/bug.html.php @@ -75,7 +75,7 @@ diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php index 047249dd44..35c0ea8330 100644 --- a/module/project/view/build.html.php +++ b/module/project/view/build.html.php @@ -74,7 +74,7 @@ builder);?> createLink('build', 'view', "buildID=$build->id&type=story&link=true"), "", '', "class='btn' title='{$lang->build->linkStory}'"); } diff --git a/module/project/view/treestory.html.php b/module/project/view/treestory.html.php index 436360f244..364650ce38 100644 --- a/module/project/view/treestory.html.php +++ b/module/project/view/treestory.html.php @@ -341,7 +341,7 @@ -createLink('action', 'comment', "objectType=story&objectID=$story->id");?> +createLink('action', 'comment', "objectType=story&objectID=$story->id");?>