-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathext.php
More file actions
42 lines (38 loc) · 1.16 KB
/
Copy pathext.php
File metadata and controls
42 lines (38 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
/**
* Chastity Tracker Extension
* @copyright (c) 2024 verturin
* @license GNU General Public License, version 2 (GPL-2.0)
*/
namespace verturin\chastitytracker;
/**
* Extension class for Chastity Tracker
*/
class ext extends \phpbb\extension\base
{
/**
* Check whether the extension can be enabled.
* Provides meaningful(s) error message(s) and the back-link on failure.
* CLI and 3.1/3.2 compatible (nothing to do).
*
* @return bool
*/
public function is_enableable()
{
// Vérifier la version PHP
$php_version = PHP_VERSION;
if (version_compare($php_version, '7.1.0', '<'))
{
trigger_error('PHP 7.1.0 ou supérieur est requis pour cette extension.', E_USER_WARNING);
return false;
}
// Vérifier la version phpBB
$config = $this->container->get('config');
if (version_compare($config['version'], '3.3.14', '<'))
{
trigger_error('phpBB 3.3.14 ou supérieur est requis pour cette extension.', E_USER_WARNING);
return false;
}
return true;
}
}