From 12175b511a051cdc11aca7e4664bd47329ab91ea Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 3 Jan 2024 16:09:48 -0800 Subject: [PATCH 1/2] Recognize phpBB version 4 better Signed-off-by: Matt Friedman --- event/listener.php | 2 +- ext.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/event/listener.php b/event/listener.php index 94878d0..203d58e 100644 --- a/event/listener.php +++ b/event/listener.php @@ -88,6 +88,6 @@ public function load_language() */ public function compatibility_notice() { - $this->template->assign_var('S_WPN_COMPATIBILITY_NOTICE', phpbb_version_compare(PHPBB_VERSION, '4.0.0-a1', '>=')); + $this->template->assign_var('S_WPN_COMPATIBILITY_NOTICE', phpbb_version_compare(PHPBB_VERSION, '4.0.0-dev', '>=')); } } diff --git a/ext.php b/ext.php index 14abf84..21da370 100644 --- a/ext.php +++ b/ext.php @@ -40,7 +40,7 @@ public function is_enableable() protected function check_phpbb_version() { if (phpbb_version_compare(PHPBB_VERSION, '3.3.12-dev', '<') || - phpbb_version_compare(PHPBB_VERSION, '4.0.0-a1', '>=')) + phpbb_version_compare(PHPBB_VERSION, '4.0.0-dev', '>=')) { $this->errors[] = 'PHPBB_VERSION_ERROR'; } From 20c5f6ed759238aead5884149e9071f26f665277 Mon Sep 17 00:00:00 2001 From: Matt Friedman Date: Wed, 3 Jan 2024 16:10:27 -0800 Subject: [PATCH 2/2] Improve phpBB4 compatibility warning message Signed-off-by: Matt Friedman --- adm/style/event/acp_main_notice_after.html | 1 + language/en/info_acp_webpushnotifications.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/adm/style/event/acp_main_notice_after.html b/adm/style/event/acp_main_notice_after.html index d02a23a..42bf2ef 100644 --- a/adm/style/event/acp_main_notice_after.html +++ b/adm/style/event/acp_main_notice_after.html @@ -1,5 +1,6 @@ {% if S_WPN_COMPATIBILITY_NOTICE %}
+

{{ lang('ACP_WEBPUSH_REMOVE_WARNING') }}

{{ lang('ACP_WEBPUSH_REMOVE_NOTICE') }}

{% endif %} diff --git a/language/en/info_acp_webpushnotifications.php b/language/en/info_acp_webpushnotifications.php index 15d4e47..487788c 100644 --- a/language/en/info_acp_webpushnotifications.php +++ b/language/en/info_acp_webpushnotifications.php @@ -39,7 +39,8 @@ $lang = array_merge($lang, [ 'ACP_WEBPUSH_SETTINGS' => 'Web Push settings', - 'ACP_WEBPUSH_REMOVE_NOTICE' => 'Web Push Notifications are now built-in to phpBB.
The extension “phpBB Browser Push Notifications” is no longer needed and should be uninstalled.
All settings and user preferences associated with the extension will be migrated into phpBB‘s built-in push notifications when you uninstall the extension.', + 'ACP_WEBPUSH_REMOVE_WARNING' => 'Web Push Notifications are now built-in to phpBB', + 'ACP_WEBPUSH_REMOVE_NOTICE' => 'The extension “phpBB Browser Push Notifications” is no longer needed and should be uninstalled.
All settings and user preferences associated with the extension will be migrated into phpBB‘s built-in push notifications when you uninstall the extension.', 'LOG_CONFIG_WEBPUSH' => 'Altered Web Push settings', 'LOG_WEBPUSH_MESSAGE_FAIL' => 'Web Push message could not be sent: %s', 'LOG_WEBPUSH_SUBSCRIPTION_REMOVED' => 'Removed Web Push subscription:» %s',