* Fix bug#16741

This commit is contained in:
zenggang
2021-12-01 01:05:20 +00:00
parent 2e36226f17
commit ce93ea9cf0
3 changed files with 6 additions and 6 deletions
+2 -1
View File
@@ -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);
+1 -4
View File
@@ -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();
}
+3 -1
View File
@@ -22,8 +22,10 @@
</div>
<div class="btn-toolbar pull-left">
<div>
<form id='gitlabprojectForm' method='post'>
<?php echo html::input('keyword', $keyword, "class='form-control' placeholder='{$lang->gitlab->placeholderSearch}' style='display: inline-block;width:auto;margin:0 10px'");?>
<a id="projectSearch" class="btn btn-primary"><?php echo $lang->gitlab->search?></a>
</form>
</div>
</div>
<div class="btn-toolbar pull-right">
@@ -43,7 +45,7 @@
<div id='mainContent' class='main-row'>
<form class='main-table' id='ajaxForm' method='post'>
<table id='gitlabProjectList' class='table has-sort-head table-fixed'>
<?php $vars = "gitlabID={$gitlabID}&keyword={$keyword}&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
<?php $vars = "gitlabID={$gitlabID}&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
<thead>
<tr>
<th class='c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->gitlab->id);?></th>