From ed3dbbc48305e6e9d457c7ffecf87d06590ec64d Mon Sep 17 00:00:00 2001 From: William Jacoby Date: Thu, 22 Oct 2026 11:56:07 -0500 Subject: [PATCH] Require phpBB 3.3.19 and PHP 8.3.36 for extension enablement --- ext.php | 19 ++++++++++++------- language/en/install_copylinks.php | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ext.php b/ext.php index b75189c..9420f27 100644 --- a/ext.php +++ b/ext.php @@ -16,13 +16,18 @@ class ext extends \phpbb\extension\base { /** - * Refuse to enable below the minimum phpBB and PHP versions. + * Check whether the extension can be enabled. + * The current phpBB and PHP version should meet or + * exceed the minimum version required by this extension: * - * @return bool|string True if enableable, otherwise the reason + * @return bool|array + * @access public */ public function is_enableable() { - if (!$this->check_phpbb_version() || !$this->check_php_version()) + $enableable = $this->check_phpbb_version() && $this->check_php_version(); + + if (!$enableable) { $language = $this->container->get('language'); $language->add_lang('install_copylinks', 'phpbbmodders/copylinks'); @@ -30,11 +35,11 @@ public function is_enableable() return $language->lang('COPYLINKS_NOT_ENABLEABLE'); } - return true; + return $enableable; } /** - * Require phpBB 3.3.19 + * Require phpBB 3.3.19 due to several security fixes in the phpBB software. * * @return bool */ @@ -44,12 +49,12 @@ public function check_phpbb_version() } /** - * Require PHP 7.4 + * Requires PHP 8.3.36 due to security fixes. * * @return bool */ public function check_php_version() { - return PHP_VERSION_ID >= 70400; + return PHP_VERSION_ID >= 80336; } } diff --git a/language/en/install_copylinks.php b/language/en/install_copylinks.php index cf3e24f..c4421e6 100644 --- a/language/en/install_copylinks.php +++ b/language/en/install_copylinks.php @@ -19,5 +19,5 @@ } $lang = array_merge($lang, [ - 'COPYLINKS_NOT_ENABLEABLE' => 'Copy Links needs phpBB 3.3.19 or newer and PHP 7.4 or newer.', + 'COPYLINKS_NOT_ENABLEABLE' => 'Copy Links needs phpBB 3.3.19 or newer and PHP 8.3.36 or newer.', ]);