diff --git a/module/bug/js/batchcreate.js b/module/bug/js/batchcreate.js index dd63b09c00..4247c145a4 100644 --- a/module/bug/js/batchcreate.js +++ b/module/bug/js/batchcreate.js @@ -99,7 +99,7 @@ function loadExecutionBuilds(productID, executionID, index) } else { - link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + "&varName=openedBuilds&build=&branch=" + branch + "&index=" + index); + link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + "&varName=openedBuilds&build=&branch=" + branch); } setOpenedBuilds(link, index); diff --git a/module/bug/js/common.js b/module/bug/js/common.js index f0d3af3334..c6338c0c56 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -179,7 +179,7 @@ function loadAllBuilds() if(page == 'resolve') { oldResolvedBuild = $('#resolvedBuild').val() ? $('#resolvedBuild').val() : 0; - link = $.createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=resolvedBuild&build=' + oldResolvedBuild + '&branch=0&index=0&type=all'); + link = $.createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=resolvedBuild&build=' + oldResolvedBuild + '&branch=0&type=all'); $('#resolvedBuildBox').load(link); } else @@ -231,7 +231,7 @@ function loadAllExecutionBuilds(executionID, productID, buildBox) } if(buildBox == 'resolvedBuildBox') { - link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=resolvedBuild&build=' + oldResolvedBuild + '&branch=' + branch + '&index=0&type=all'); + link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=resolvedBuild&build=' + oldResolvedBuild + '&branch=' + branch + '&type=all'); $('#resolvedBuildBox').load(link, function(){$(this).find('select').picker({optionRender: markReleasedBuilds, dropWidth: 'auto'})}); } } @@ -254,7 +254,7 @@ function loadAllProductBuilds(productID, buildBox) if(page == 'create') { - link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=openedBuild&build=' + oldOpenedBuild + '&branch=' + branch + '&index=0&type=all'); + link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=openedBuild&build=' + oldOpenedBuild + '&branch=' + branch + '&type=all'); $.get(link, function(data) { if(!data) data = ''; @@ -269,12 +269,12 @@ function loadAllProductBuilds(productID, buildBox) { if(buildBox == 'openedBuildBox') { - link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=openedBuild&build=' + oldOpenedBuild + '&branch=' + branch + '&index=0&type=all'); + link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=openedBuild&build=' + oldOpenedBuild + '&branch=' + branch + '&type=all'); $('#openedBuildBox').load(link, function(){$(this).find('select').picker({optionRender: markReleasedBuilds})}); } if(buildBox == 'resolvedBuildBox') { - link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=resolvedBuild&build=' + oldResolvedBuild + '&branch=' + branch + '&index=0&type=all'); + link = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + '&varName=resolvedBuild&build=' + oldResolvedBuild + '&branch=' + branch + '&type=all'); $('#resolvedBuildBox').load(link, function() { $(this).find('select').picker({optionRender: markReleasedBuilds, dropWidth: 'auto'}) @@ -959,7 +959,7 @@ function setBranchRelated(branchID, productID, num) $("#executions" + num).chosen(); }); - var buildLink = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + "&varName=openedBuilds&build=&branch=" + branchID + "&index=" + num); + var buildLink = createLink('build', 'ajaxGetProductBuilds', 'productID=' + productID + "&varName=openedBuilds&build=&branch=" + branchID); /* If the branch of the current row is inconsistent with the one below, clear the module and execution of the nex row. */ if(config.currentMethod == 'batchcreate') diff --git a/module/build/control.php b/module/build/control.php index ca717e4122..35b05b8b91 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -388,13 +388,12 @@ class build extends control * @param string $varName the name of the select object to create * @param string $build build to selected * @param string|int $branch - * @param int $index the index of batch create bug. * @param string $type get all builds or some builds belong to normal releases and executions are not done. * @param string $extra * @access public * @return string */ - public function ajaxGetProductBuilds($productID, $varName, $build = '', $branch = 'all', $index = 0, $type = 'normal', $extra = '') + public function ajaxGetProductBuilds($productID, $varName, $build = '', $branch = 'all', $type = 'normal', $extra = '') { $isJsonView = $this->app->getViewType() == 'json'; if($varName == 'openedBuild' ) diff --git a/module/design/control.php b/module/design/control.php index 7160465ed3..8217a55a55 100755 --- a/module/design/control.php +++ b/module/design/control.php @@ -290,13 +290,12 @@ class design extends control * @param int $repoID * @param string $begin * @param string $end - * @param int $recTotal * @param int $recPerPage * @param int $pageID * @access public * @return void */ - public function linkCommit(int $designID = 0, int $repoID = 0, string $begin = '', string $end = '', int $recTotal = 0, int $recPerPage = 50, int $pageID = 1) + public function linkCommit(int $designID = 0, int $repoID = 0, string $begin = '', string $end = '', int $recPerPage = 50, int $pageID = 1) { $design = $this->design->getById($designID); $this->commonAction($design->project, (int)$design->product, $designID); diff --git a/module/design/ui/linkcommit.html.php b/module/design/ui/linkcommit.html.php index 61a2f652d4..f11968ce87 100644 --- a/module/design/ui/linkcommit.html.php +++ b/module/design/ui/linkcommit.html.php @@ -97,7 +97,7 @@ else set::footPager( usePager ( - array('linkCreator' => helper::createLink('design', 'linkCommit', "designID={$designID}&repoID={$repoID}&begin={$begin}&end={$end}&recTotal={recTotal}&recPerPage={recPerPage}&pageID={page}")), + array('linkCreator' => helper::createLink('design', 'linkCommit', "designID={$designID}&repoID={$repoID}&begin={$begin}&end={$end}&recPerPage={recPerPage}&pageID={page}")), ), ), ); diff --git a/module/execution/ui/create.html.php b/module/execution/ui/create.html.php index 98f9a37e4e..f36361acbb 100644 --- a/module/execution/ui/create.html.php +++ b/module/execution/ui/create.html.php @@ -88,7 +88,7 @@ if(isset($project->hasProduct) && !empty($project->hasProduct) && $products) { $hasBranch = $product->type != 'normal' && isset($branchGroups[$product->id]); $branches = isset($branchGroups[$product->id]) ? $branchGroups[$product->id] : array(); - if(!isset($linkedBranches)) $branchIdList = isset($product->branches) ? join(',', $product->branches) : ''; + if(!isset($linkedBranches)) $branchIdList = isset($product->branches) ? implode(',', $product->branches) : ''; if(isset($linkedBranches)) $branchIdList = !empty($linkedBranches[$product->id]) ? $linkedBranches[$product->id] : ''; if(empty($productID) || (!empty($productID) || $productID != $product->id)) { diff --git a/module/execution/ui/edit.html.php b/module/execution/ui/edit.html.php index 0ca57e9fb1..2249af07ad 100644 --- a/module/execution/ui/edit.html.php +++ b/module/execution/ui/edit.html.php @@ -163,7 +163,7 @@ if($project->model != 'waterfall' && $project->model != 'waterfallplus') set::value($product->id), set::items($allProducts), set::last($product->id), - $hasBranch ? set::lastBranch(join(',', $product->branches)) : null, + $hasBranch ? set::lastBranch(implode(',', $product->branches)) : null, set::disabled($execution->type == 'stage' && $project->stageBy == 'project'), set::required(true), on::change('productChange'), @@ -352,7 +352,7 @@ else set::value($product->id), set::items($allProducts), set::last($product->id), - $hasBranch && $product->branches ? set::lastBranch(join(',', $product->branches)) : null, + $hasBranch && $product->branches ? set::lastBranch(implode(',', $product->branches)) : null, set::disabled($project->model == 'waterfall' || $project->model == 'waterfallplus'), set::required(true), on::change('productChange'), diff --git a/module/group/control.php b/module/group/control.php index 6ac6c9c33e..33b2b4ef17 100644 --- a/module/group/control.php +++ b/module/group/control.php @@ -492,13 +492,12 @@ class group extends control * @param string $browseType * @param string $view * @param int $paramID - * @param int $recTotal * @param int $recPerPage * @param int $pageID * @access public * @return void */ - public function editManagePriv($browseType = '', $view = '', $paramID = 0, $recTotal = 0, $recPerPage = 100, $pageID = 1) + public function editManagePriv($browseType = '', $view = '', $paramID = 0, $recPerPage = 100, $pageID = 1) { if(empty($browseType) and $browseType != 'bysearch') $browseType = $this->cookie->managePrivEditType ? $this->cookie->managePrivEditType : 'bycard'; if($browseType == 'bysearch' and $this->cookie->managePrivEditType == 'bycard') $browseType = 'bycard'; @@ -536,7 +535,7 @@ class group extends control /* Build the search form. */ $queryID = ($browseType == 'bysearch') ? (int)$paramID : 0; - $actionURL = $this->createLink('group', 'editManagePriv', "browseType=bysearch&view=¶mID=myQueryID&recTotal=$total&recPerPage=$recPerPage"); + $actionURL = $this->createLink('group', 'editManagePriv', "browseType=bysearch&view=¶mID=myQueryID&recPerPage=$recPerPage"); $this->group->buildPrivSearchForm($queryID, $actionURL); $privRelations = $this->group->getPrivRelationsByIdList(array_keys($privList)); diff --git a/module/project/ui/ajaxgetdropmenu.html.php b/module/project/ui/ajaxgetdropmenu.html.php index d190cad546..0bd2c1af39 100644 --- a/module/project/ui/ajaxgetdropmenu.html.php +++ b/module/project/ui/ajaxgetdropmenu.html.php @@ -22,7 +22,7 @@ $getProjectGroup = function($project): string { global $app; if($project->status != 'done' and $project->status != 'closed' and $project->PM == $app->user->account) return 'my'; - if($project->status != 'done' and $project->status != 'closed' and !($project->PM == $app->user->account)) return 'other'; + if($project->status != 'done' and $project->status != 'closed' and $project->PM != $app->user->account) return 'other'; return 'closed'; }; diff --git a/module/project/ui/edit.html.php b/module/project/ui/edit.html.php index c33953863d..c2dc75b30e 100644 --- a/module/project/ui/edit.html.php +++ b/module/project/ui/edit.html.php @@ -74,7 +74,7 @@ if($linkedProducts) set::value($product->id), set::items($allProducts), set::last($product->id), - $hasBranch ? set::lastBranch(join(',', $product->branches)) : null, + $hasBranch ? set::lastBranch(implode(',', $product->branches)) : null, on::change('productChange') ) ), @@ -91,7 +91,7 @@ if($linkedProducts) ( set::name("branch[$i][]"), set::items($branches), - set::value(join(',', $product->branches)), + set::value(implode(',', $product->branches)), on::change('branchChange') ) ),