-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathext.php
More file actions
40 lines (33 loc) · 985 Bytes
/
ext.php
File metadata and controls
40 lines (33 loc) · 985 Bytes
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
<?php
/**
*
* @package phpBB Extension - Anonymous Posts
* @copyright (c) 2018 toxyy <thrashtek@yahoo.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
namespace toxyy\anonymousposts;
use phpbb\extension\base;
class ext extends base
{
/**
* phpBB 3.3.x and PHP 7+
*/
public function is_enableable()
{
$ext_manager = $this->container->get('ext.manager');
$config = $this->container->get('config');
// don't need this anymore, but i want to keep the code
$is_enableable = true;
/*$ext_manager->is_enabled('marttiphpbb/grouptempvars');
// if not enableable, add our custom install error language keys
if (!$is_enableable)
{
$lang = $this->container->get('language');
$lang->add_lang('anp_install', 'toxyy/anonymousposts');
}*/
// check phpbb and phpbb versions
$is_enableable = ($is_enableable && (phpbb_version_compare($config['version'], '3.3', '>=') && version_compare(PHP_VERSION, '7', '>=')));
return $is_enableable;
}
}