-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathext.php
More file actions
31 lines (25 loc) · 803 Bytes
/
ext.php
File metadata and controls
31 lines (25 loc) · 803 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
<?php
/**
* @copyright (c) 2015 phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
*/
namespace avathar\quickstyle;
class ext extends \phpbb\extension\base
{
const MIN_PHP_VERSION = '8.1.0';
const MIN_PHPBB_VERSION = '3.3.0';
public function is_enableable()
{
$errors = [];
if (version_compare(PHP_VERSION, self::MIN_PHP_VERSION, '<'))
{
$errors[] = 'This extension requires PHP ' . self::MIN_PHP_VERSION . ' or higher. You are running PHP ' . PHP_VERSION . '.';
}
if (phpbb_version_compare(PHPBB_VERSION, self::MIN_PHPBB_VERSION, '<'))
{
$errors[] = 'This extension requires phpBB ' . self::MIN_PHPBB_VERSION . ' or higher. You are running phpBB ' . PHPBB_VERSION . '.';
}
return empty($errors) ? true : $errors;
}
}