Skip to content

Commit c2808da

Browse files
authored
Merge pull request #55 from ggoffy/master
semantic versioning / fixed missing criteria in search
2 parents 74c405e + ad29f5f commit c2808da

3 files changed

Lines changed: 17 additions & 3 deletions

File tree

docs/changelog.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
===================================================================
2+
2021/11/17 Version 1.5.0 RC1
3+
===================================================================
4+
- semantic versioning (mamba/goffy)
5+
- fixed missing criteria in search (alain01/goffy)
6+
17
===================================================================
28
2021/03/31 Version 1.04 RC1
39
===================================================================

include/search.inc.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
*/
2222

2323
use XoopsModules\Wggithub;
24+
use XoopsModules\Wggithub\ {
25+
Helper,
26+
Constants
27+
};
2428

2529

2630
/**
@@ -36,7 +40,7 @@
3640
function wggithub_search($queryarray, $andor, $limit, $offset, $userid)
3741
{
3842
$ret = [];
39-
$helper = \XoopsModules\Wggithub\Helper::getInstance();
43+
$helper = Helper::getInstance();
4044
$repositoriesHandler = $helper->getHandler('Repositories');
4145
$directoriesHandler = $helper->getHandler('Directories');
4246

@@ -75,6 +79,10 @@ function wggithub_search($queryarray, $andor, $limit, $offset, $userid)
7579
if (isset($crUser)) {
7680
$crSearch->add($crUser, 'AND');
7781
}
82+
if (0 === (int)$helper->getConfig('autoapproved')) {
83+
$crSearch->add(new \Criteria('repo_approved', 1));
84+
}
85+
$crSearch->add(new \Criteria('repo_status', Constants::STATUS_UPTODATE));
7886
$crSearch->setStart($offset);
7987
$crSearch->setLimit($limit);
8088
$crSearch->setSort('repo_datecreated');

xoops_version.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// ------------------- Informations ------------------- //
3030
$modversion = [
3131
'name' => \_MI_WGGITHUB_NAME,
32-
'version' => 1.04,
32+
'version' => '1.5.0',
3333
'description' => \_MI_WGGITHUB_DESC,
3434
'author' => 'Goffy - XOOPS Development Team',
3535
'author_mail' => 'goffy@wedega.com',
@@ -45,7 +45,7 @@
4545
'manual' => 'link to manual file',
4646
'manual_file' => \XOOPS_URL . '/modules/wggithub/docs/install.txt',
4747
'min_php' => '7.3',
48-
'min_xoops' => '2.5.11',
48+
'min_xoops' => '2.5.11 Beta1',
4949
'min_admin' => '1.2',
5050
'min_db' => ['mysql' => '5.6', 'mysqli' => '5.6'],
5151
'image' => 'assets/images/logoModule.png',

0 commit comments

Comments
 (0)