diff --git a/.gitattributes b/.gitattributes index 6dbe3f1..d3b69a6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,3 +5,4 @@ tests/ export-ignore .gitattributes export-ignore phpunit.xml.* export-ignore composer.lock export-ignore +composer.phar export-ignore diff --git a/.gitignore b/.gitignore index 2666cbc..b215946 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /build/ /vendor/ /node_modules/ +/composer.phar diff --git a/acp/wpn_acp_module.php b/acp/wpn_acp_module.php index ab522b9..1471b7e 100644 --- a/acp/wpn_acp_module.php +++ b/acp/wpn_acp_module.php @@ -65,33 +65,28 @@ public function main($id, $mode) $form_key = 'phpbb/webpushnotifications'; add_form_key($form_key); - switch ($mode) + if ($mode === 'webpush') { - case 'webpush': - // Load a template from adm/style for our ACP page - $this->tpl_name = 'wpn_acp_settings'; + // Load a template from adm/style for our ACP page + $this->tpl_name = 'wpn_acp_settings'; - $this->lang->add_lang('webpushnotifications_module_acp', 'phpbb/webpushnotifications'); + $this->lang->add_lang('webpushnotifications_module_acp', 'phpbb/webpushnotifications'); - // Set the page title for our ACP page - $this->page_title = $this->lang->lang('ACP_WEBPUSH_SETTINGS'); + // Set the page title for our ACP page + $this->page_title = $this->lang->lang('ACP_WEBPUSH_SETTINGS'); - if ($this->request->is_set_post('submit')) + if ($this->request->is_set_post('submit')) + { + if (!check_form_key($form_key)) { - if (!check_form_key($form_key)) - { - $language = $phpbb_container->get('language'); - trigger_error($language->lang('FORM_INVALID'), E_USER_WARNING); - } - - $this->save_settings(); + $language = $phpbb_container->get('language'); + trigger_error($language->lang('FORM_INVALID'), E_USER_WARNING); } - $this->display_settings(); - break; + $this->save_settings(); + } - default: - break; + $this->display_settings(); } } diff --git a/adm/style/event/acp_main_notice_after.html b/adm/style/event/acp_main_notice_after.html new file mode 100644 index 0000000..d02a23a --- /dev/null +++ b/adm/style/event/acp_main_notice_after.html @@ -0,0 +1,5 @@ +{% if S_WPN_COMPATIBILITY_NOTICE %} +
{{ lang('ACP_WEBPUSH_REMOVE_NOTICE') }}
+