Skip to content

Commit 33237ef

Browse files
authored
Merge pull request #174 from iMattPro/updates
Small updates
2 parents e6c1122 + 1a14786 commit 33237ef

4 files changed

Lines changed: 31 additions & 28 deletions

File tree

.github/workflows/tests.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,22 @@ jobs:
9393
strategy:
9494
matrix:
9595
include:
96-
- php: '7.1'
96+
- php: '7.2'
9797
db: "mariadb:10.1"
98-
- php: '7.1'
98+
- php: '7.2'
9999
db: "mariadb:10.2"
100-
- php: '7.1'
100+
- php: '7.2'
101101
db: "mariadb:10.3"
102-
- php: '7.1'
102+
- php: '7.2'
103103
db: "mariadb:10.4"
104-
- php: '7.1'
104+
- php: '7.2'
105105
db: "mariadb:10.5"
106-
- php: '7.1'
106+
- php: '7.2'
107107
db: "mysql:5.6"
108108
db_alias: "MyISAM Tests"
109109
MYISAM: 1
110-
- php: '7.1'
110+
- php: '7.2'
111111
db: "mysql:5.6"
112-
- php: '7.1'
113-
db: "mysql:5.7"
114112
- php: '7.2'
115113
db: "mysql:5.7"
116114
COVERAGE: 1
@@ -127,6 +125,8 @@ jobs:
127125
db: "mysql:5.7"
128126
- php: '8.2'
129127
db: "mysql:5.7"
128+
- php: '8.3'
129+
db: "mysql:5.7"
130130

131131
name: PHP ${{ matrix.php }} - ${{ matrix.db_alias != '' && matrix.db_alias || matrix.db }}
132132

@@ -244,18 +244,16 @@ jobs:
244244
strategy:
245245
matrix:
246246
include:
247-
- php: '7.1'
247+
- php: '7.2'
248248
db: "postgres:9.5"
249-
- php: '7.1'
249+
- php: '7.2'
250250
db: "postgres:9.6"
251-
- php: '7.1'
251+
- php: '7.2'
252252
db: "postgres:10"
253-
- php: '7.1'
253+
- php: '7.2'
254254
db: "postgres:11"
255-
- php: '7.1'
255+
- php: '7.2'
256256
db: "postgres:12"
257-
- php: '7.1'
258-
db: "postgres:13"
259257
- php: '7.2'
260258
db: "postgres:13"
261259
- php: '7.3'
@@ -270,6 +268,8 @@ jobs:
270268
db: "postgres:14"
271269
- php: '8.2'
272270
db: "postgres:14"
271+
- php: '8.3'
272+
db: "postgres:14"
273273

274274
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
275275

@@ -358,7 +358,7 @@ jobs:
358358
strategy:
359359
matrix:
360360
include:
361-
- php: '7.1'
361+
- php: '7.2'
362362
db: "sqlite3"
363363
- php: '7.2'
364364
db: "mcr.microsoft.com/mssql/server:2017-latest"

acp/autogroups_module.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function main($id, $mode)
5050
$this->tpl_name = 'manage_autogroups';
5151

5252
// Set the page title for our ACP auto groups
53-
$this->page_title = $language->lang('ACP_AUTOGROUPS_MANAGE');
53+
$this->page_title = 'ACP_AUTOGROUPS_MANAGE';
5454

5555
// Quick-submit settings from the general options form
5656
if ($request->is_set_post('generalsubmit'))
@@ -64,7 +64,7 @@ public function main($id, $mode)
6464
case 'add':
6565
case 'edit':
6666
// Set the page title for our ACP auto groups
67-
$this->page_title = $language->lang(strtoupper("ACP_AUTOGROUPS_$action"));
67+
$this->page_title = strtoupper("ACP_AUTOGROUPS_$action");
6868

6969
// Load the save auto group handle in the admin controller
7070
$admin_controller->save_autogroup_rule($autogroups_id);

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@
6565
"version-check": {
6666
"host": "www.phpbb.com",
6767
"directory": "/customise/db/extension/auto_groups",
68-
"filename": "version_check"
68+
"filename": "version_check",
69+
"ssl": true
6970
}
7071
}
7172
}

tests/functional/lastvisit_test.php

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ public function test_autogroups_memberships()
2525
$test_data = array(
2626
'type' => 'lastvisit',
2727
'group_name' => 'test-lastvisit',
28-
'min' => 0,
29-
'max' => 10,
28+
'min' => 10,
29+
'max' => 1000,
3030
);
3131

32+
$test_user_id = $this->create_user('Bertie');
33+
3234
// Create a new test group
3335
$group_id = $this->create_group($test_data['group_name']);
3436
self::assertNotNull($group_id, 'Failed to create a test group.');
@@ -37,17 +39,17 @@ public function test_autogroups_memberships()
3739
$autogroup_id = $this->create_autogroup_rule($test_data['type'], $group_id, $test_data['min'], $test_data['max']);
3840
self::assertNotNull($autogroup_id, 'Failed to create an auto group rule set.');
3941

40-
// Run the cron job for a user with 2 days of membership, should add the user to the group
41-
$this->update_user_lastvisit(2, 2)->reset_cron();
42+
// Run the cron job for a user with 20 days since last visit, should add the user to the group
43+
$this->update_user_lastvisit($test_user_id, 20)->reset_cron();
4244
self::request('GET', "cron.php?cron_type=cron.task.autogroups_check&sid={$this->sid}", array(), false);
4345
$this->purge_cache();
44-
$this->assertInGroup(2, $test_data['group_name']);
46+
$this->assertInGroup($test_user_id, $test_data['group_name']);
4547

46-
// Run the cron job for a user with 20 days of membership, should remove the user from the group
47-
$this->update_user_lastvisit(2, 20)->reset_cron();
48+
// Run the cron job for a user with 2 days since last visit, should remove the user from the group
49+
$this->update_user_lastvisit($test_user_id, 2)->reset_cron();
4850
self::request('GET', "cron.php?cron_type=cron.task.autogroups_check&sid={$this->sid}", array(), false);
4951
$this->purge_cache();
50-
$this->assertNotInGroup(2, $test_data['group_name']);
52+
$this->assertNotInGroup($test_user_id, $test_data['group_name']);
5153
}
5254

5355
/**

0 commit comments

Comments
 (0)