-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathext.php
35 lines (32 loc) · 819 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
<?php
/**
*
* @package National Flags
* @copyright (c) 2015 Rich McGirr(RMcGirr83)
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
namespace rmcgirr83\nationalflags;
/**
* Extension class for custom enable/disable/purge actions
*/
class ext extends \phpbb\extension\base
{
/**
* Enable extension if phpBB version requirement is met
*
* @return bool
* @access public
*/
public function is_enableable()
{
$enableable = (phpbb_version_compare(PHPBB_VERSION, '3.3', '>=') && version_compare(PHP_VERSION, '7.4.*', '>'));
if (!$enableable)
{
$language = $this->container->get('language');
$language->add_lang('nationalflags_acp', 'rmcgirr83/nationalflags');
trigger_error($language->lang(('FLAGS_REQUIRE_540'), E_USER_WARNING));
}
return $enableable;
}
}