Skip to content

Commit 5191a07

Browse files
committed
Prevent collision with push module in phpbb 4
Signed-off-by: Matt Friedman <maf675@gmail.com>
1 parent 1c6781a commit 5191a07

6 files changed

Lines changed: 8 additions & 8 deletions

File tree

acp/wpn_acp_info.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ public function module()
1616
{
1717
return [
1818
'filename' => '\phpbb\webpushnotifications\acp\wpn_acp_module',
19-
'title' => 'ACP_WEBPUSH_SETTINGS',
19+
'title' => 'ACP_WEBPUSH_EXT_SETTINGS',
2020
'modes' => [
2121
'webpush' => [
22-
'title' => 'ACP_WEBPUSH_SETTINGS',
22+
'title' => 'ACP_WEBPUSH_EXT_SETTINGS',
2323
'auth' => 'ext_phpbb/webpushnotifications && acl_a_server',
2424
'cat' => ['ACP_CLIENT_COMMUNICATION']
2525
],

acp/wpn_acp_module.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function main($id, $mode)
7676
$this->lang->add_lang('webpushnotifications_module_acp', 'phpbb/webpushnotifications');
7777

7878
// Set the page title for our ACP page
79-
$this->page_title = $this->lang->lang('ACP_WEBPUSH_SETTINGS');
79+
$this->page_title = $this->lang->lang('ACP_WEBPUSH_EXT_SETTINGS');
8080

8181
if ($this->request->is_set_post('submit'))
8282
{

adm/style/wpn_acp_settings.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{% include 'overall_header.html' %}
22
{% INCLUDEJS '@phpbb_webpushnotifications/wpn_acp.js' %}
33

4-
<h1>{{ lang('ACP_WEBPUSH_SETTINGS') }}</h1>
4+
<h1>{{ lang('ACP_WEBPUSH_EXT_SETTINGS') }}</h1>
55

66
<p>{{ lang('ACP_WEBPUSH_SETTINGS_EXPLAIN') }}</p>
77

language/en/info_acp_webpushnotifications.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
//
3939

4040
$lang = array_merge($lang, [
41-
'ACP_WEBPUSH_SETTINGS' => 'Web Push settings',
41+
'ACP_WEBPUSH_EXT_SETTINGS' => 'Web Push settings',
4242
'ACP_WEBPUSH_REMOVE_WARNING' => 'Web Push Notifications are now built-in to phpBB',
4343
'ACP_WEBPUSH_REMOVE_NOTICE' => 'The extension “phpBB Browser Push Notifications” is no longer needed and should be uninstalled.<br>All settings and user preferences associated with the extension will be migrated into phpBB‘s built-in push notifications when you uninstall the extension.',
4444
'LOG_CONFIG_WEBPUSH' => '<strong>Altered Web Push settings</strong>',

migrations/add_webpush.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function update_data(): array
7272
['config.add', ['wpn_webpush_vapid_private', '']],
7373
['module.add', ['acp', 'ACP_CLIENT_COMMUNICATION', [
7474
'module_basename' => '\phpbb\webpushnotifications\acp\wpn_acp_module',
75-
'module_langname' => 'ACP_WEBPUSH_SETTINGS',
75+
'module_langname' => 'ACP_WEBPUSH_EXT_SETTINGS',
7676
'module_mode' => 'webpush',
7777
'after' => 'ACP_JABBER_SETTINGS',
7878
]]],
@@ -85,7 +85,7 @@ public function revert_data(): array
8585
['config.remove', ['wpn_webpush_enable']],
8686
['config.remove', ['wpn_webpush_vapid_public']],
8787
['config.remove', ['wpn_webpush_vapid_private']],
88-
['module.remove', ['acp', 'ACP_BOARD_CONFIGURATION', 'ACP_WEBPUSH_SETTINGS']]
88+
['module.remove', ['acp', 'ACP_BOARD_CONFIGURATION', 'ACP_WEBPUSH_EXT_SETTINGS']]
8989
];
9090
}
9191
}

tests/functional/functional_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function test_acp_module()
4040

4141
$crawler = self::request('GET', 'adm/index.php?i=-phpbb-webpushnotifications-acp-wpn_acp_module&mode=webpush&sid=' . $this->sid);
4242

43-
$this->assertContainsLang('ACP_WEBPUSH_SETTINGS', $crawler->filter('div.main > h1')->text());
43+
$this->assertContainsLang('ACP_WEBPUSH_EXT_SETTINGS', $crawler->filter('div.main > h1')->text());
4444
$this->assertContainsLang('ACP_WEBPUSH_SETTINGS_EXPLAIN', $crawler->filter('div.main > p')->text());
4545
$this->assertContainsLang('WEBPUSH_GENERATE_VAPID_KEYS', $crawler->filter('input[type="button"]')->attr('value'));
4646

0 commit comments

Comments
 (0)