Skip to content

Commit 7bb2a6b

Browse files
committed
Use separate messages for phpBB version checks
Signed-off-by: Matt Friedman <maf675@gmail.com>
1 parent 939b355 commit 7bb2a6b

3 files changed

Lines changed: 13 additions & 7 deletions

File tree

ext.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,14 @@ public function is_enableable()
3939
*/
4040
protected function check_phpbb_version()
4141
{
42-
if (phpbb_version_compare(PHPBB_VERSION, '3.3.12-dev', '<') ||
43-
phpbb_version_compare(PHPBB_VERSION, '4.0.0-dev', '>='))
42+
if (phpbb_version_compare(PHPBB_VERSION, '3.3.12', '<'))
4443
{
45-
$this->errors[] = 'PHPBB_VERSION_ERROR';
44+
$this->errors[] = 'PHPBB_VERSION_MIN_ERROR';
45+
}
46+
47+
if (phpbb_version_compare(PHPBB_VERSION, '4.0.0-dev', '>='))
48+
{
49+
$this->errors[] = 'PHPBB_VERSION_MAX_ERROR';
4650
}
4751

4852
return $this;

language/en/install.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
//
3939

4040
$lang = array_merge($lang, [
41-
'PHPBB_VERSION_ERROR' => 'This extension is not compatible with your board. You must be using phpBB 3.3.12 or newer, up to but not including phpBB 4.x.x.',
42-
'PHP_VERSION_ERROR' => 'This extension is not compatible with your server. Your server must be running PHP 7.3 or newer.',
41+
'PHPBB_VERSION_MAX_ERROR' => 'This extension can not be installed on your board. You are using phpBB 4, which already contains the features in this extension.',
42+
'PHPBB_VERSION_MIN_ERROR' => 'This extension is not compatible with your board. You must be using phpBB 3.3.12 or newer.',
43+
'PHP_VERSION_ERROR' => 'This extension is not compatible with your server. Your server must be running PHP 7.3 or newer.',
4344
]);

language/ru/install.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
//
3939

4040
$lang = array_merge($lang, [
41-
'PHPBB_VERSION_ERROR' => 'Данное расширение несовместимо с установленной версией конференции. Необходима версия phpBB 3.3.12 или выше, за исключением phpBB 4.x.x.',
42-
'PHP_VERSION_ERROR' => 'Данное расширение несовместимо с установленной на сервере версией PHP. Необходима версия PHP 7.3 или выше.',
41+
'PHPBB_VERSION_MAX_ERROR' => 'Это расширение не может быть установлено на вашу доску. Вы используете phpBB 4, который уже содержит функции этого расширения.',
42+
'PHPBB_VERSION_MIN_ERROR' => 'Это расширение несовместимо с вашей доской. Вы должны использовать phpBB версии 3.3.12 или новее.',
43+
'PHP_VERSION_ERROR' => 'Данное расширение несовместимо с установленной на сервере версией PHP. Необходима версия PHP 7.3 или выше.',
4344
]);

0 commit comments

Comments
 (0)