-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext.php
44 lines (38 loc) · 933 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
43
44
<?php
/**
* Created by PhpStorm.
* User: Guntis
* Date: 29.05.2018
* Time: 12:37
*/
namespace indextree\newsletter;
/**
* @ignore
*/
/**
* Class ext
*
* It is recommended to remove this file from
* an extension if it is not going to be used.
*/
class ext extends \phpbb\extension\base
{
/**
* Enable extension if phpBB version requirement is met
*
* @return bool
* @access public
*/
public function is_enableable()
{
$config = $this->container->get('config');
$enableable = (phpbb_version_compare($config['version'], '3.2.1', '>=') && version_compare(PHP_VERSION, '5.4.*', '>'));
if (!$enableable)
{
$user = $this->container->get('user');
$user->add_lang_ext('indextree/newsletter', 'common');
trigger_error($user->lang('NEWSLETTER_REQUIRE_540'), E_USER_WARNING);
}
return $enableable;
}
}