Skip to content

Commit 163d1c5

Browse files
authored
Merge pull request #54 from iMattPro/trivial
More trivial updates
2 parents c5df91e + 20ba528 commit 163d1c5

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

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
]);

notification/method/webpush.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class webpush extends messenger_base implements extended_method_interface
5252
protected $push_subscriptions_table;
5353

5454
/** @var int Fallback size for padding if endpoint is mozilla, see https://github.com/web-push-libs/web-push-php/issues/108#issuecomment-2133477054 */
55-
const MOZILLA_FALLBACK_PADDING = 2820;
55+
public const MOZILLA_FALLBACK_PADDING = 2820;
5656

5757
/**
5858
* Notification Method Web Push constructor
@@ -216,7 +216,7 @@ protected function notify_using_webpush(): void
216216

217217
$user_subscriptions = $user_subscription_map[$notification->user_id] ?? [];
218218

219-
if ($user['user_type'] == USER_INACTIVE && $user['user_inactive_reason'] == INACTIVE_MANUAL
219+
if (($user['user_type'] == USER_INACTIVE && $user['user_inactive_reason'] == INACTIVE_MANUAL)
220220
|| empty($user_subscriptions))
221221
{
222222
continue;

0 commit comments

Comments
 (0)