-
Notifications
You must be signed in to change notification settings - Fork 19
/
ext.php
38 lines (34 loc) · 813 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
<?php
/**
* This file is part of the phpBB Topic Solved extension package.
*
* @copyright (c) Bryan Petty
* @license GNU General Public License, version 2 (GPL-2.0)
*
* @package tierra/topicsolved
*/
namespace tierra\topicsolved;
/**
* Extension enable, disable, and purge triggers.
*
* @package tierra/topicsolved
*/
class ext extends \phpbb\extension\base
{
/** Minimum PHP version. */
const PHP_MIN_VERSION = '5.3.10';
/** Minimum phpBB version. */
const PHPBB_MIN_VERSION = '3.1.3';
/**
* Enable extension if requirements are met.
*
* @return bool
*/
public function is_enableable()
{
$config = $this->container->get('config');
return
version_compare(PHP_VERSION, self::PHP_MIN_VERSION, '>=') &&
version_compare($config['version'], self::PHPBB_MIN_VERSION, '>=');
}
}