From ce93ea9cf0b52ade6776f621a2ef6ac12c68f985 Mon Sep 17 00:00:00 2001 From: zenggang Date: Wed, 1 Dec 2021 01:05:20 +0000 Subject: [PATCH] * Fix bug#16741 --- module/gitlab/control.php | 3 ++- module/gitlab/js/browseproject.js | 5 +---- module/gitlab/view/browseproject.html.php | 4 +++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/gitlab/control.php b/module/gitlab/control.php index bb305b728a..bb0006ee1a 100644 --- a/module/gitlab/control.php +++ b/module/gitlab/control.php @@ -604,10 +604,11 @@ class gitlab extends control * @access public * @return void */ - public function browseProject($gitlabID, $keyword = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1) + public function browseProject($gitlabID, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1) { $this->app->loadClass('pager', $static = true); $pager = new pager($recTotal, $recPerPage, $pageID); + $keyword = fixer::input('post')->setDefault('keyword', '')->get('keyword'); // Fix bug#16741. $result = $this->gitlab->apiGetProjectsPager($gitlabID, $keyword, $orderBy, $pager); diff --git a/module/gitlab/js/browseproject.js b/module/gitlab/js/browseproject.js index 838cbb39fd..af5f37901a 100644 --- a/module/gitlab/js/browseproject.js +++ b/module/gitlab/js/browseproject.js @@ -13,8 +13,5 @@ $(document).ready(function() function triggerSearch() { - var keyword = $('#keyword').val(); - vars = vars.replace('%s', keyword); - var link = createLink('gitlab', 'browseProject', 'gitlabID=' + gitlabID + '&' + vars); - window.location.href = link; + $("#gitlabprojectForm").submit(); } diff --git a/module/gitlab/view/browseproject.html.php b/module/gitlab/view/browseproject.html.php index 36d20948cb..996208e7db 100644 --- a/module/gitlab/view/browseproject.html.php +++ b/module/gitlab/view/browseproject.html.php @@ -22,8 +22,10 @@
+
gitlab->placeholderSearch}' style='display: inline-block;width:auto;margin:0 10px'");?> gitlab->search?> +
@@ -43,7 +45,7 @@
- recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> + recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
gitlab->id);?>