-
Notifications
You must be signed in to change notification settings - Fork 10
/
ext.php
executable file
·42 lines (36 loc) · 934 Bytes
/
ext.php
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
/**
*
* @package phpBB Extension - Digests
* @copyright (c) 2021 Mark D. Hamill ([email protected])
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
namespace phpbbservices\digests;
/**
* @ignore
*/
class ext extends \phpbb\extension\base
{
public function is_enableable()
{
$config = $this->container->get('config');
// Only phpBB 3.3 is now supported.
if (
phpbb_version_compare($config['version'], '3.3.0', '>=') &&
phpbb_version_compare($config['version'], '4.0', '<')
)
{
// Conditions met to install extension
return true;
}
else
{
// Import the extension's language file
$language = $this->container->get('language');
$language->add_lang('common', 'phpbbservices/digests');
// Return generic message indicating not all install requirements were met.
return [$language->lang('DIGESTS_INSTALL_REQUIREMENTS')];
}
}
}