From 8e1102b1da2652e88906a1cc6ecd47acec3fab7a Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Thu, 5 May 2016 05:26:19 -0400 Subject: [ticket/14624] Add event to ucp_profile in signature section PHPBB3-14624 --- phpBB/includes/ucp/ucp_profile.php | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 2708a8dedf..3e21618b27 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -492,6 +492,32 @@ class ucp_profile $error[] = 'FORM_INVALID'; } + /** + * Modify user signature on editing profile in UCP + * + * @event core.ucp_profile_modify_signature + * @var bool enable_bbcode Whether or not bbcode is enabled + * @var bool enable_smilies Whether or not smilies are enabled + * @var bool enable_urls Whether or not urls are enabled + * @var string signature Users signature text + * @var object message_parser The message parser object + * @var array error Any error strings + * @var bool submit Whether or not the form has been sumitted + * @var bool preview Whether or not the signature is being previewed + * @since 3.1.9 + */ + $vars = array( + 'enable_bbocde', + 'enable_smilies', + 'enable_urls', + 'signature', + 'message_parser', + 'error', + 'submit', + 'preview', + ); + extract($phpbb_dispatcher->trigger_event('core.ucp_profile_modify_signature', compact($vars))); + if (!sizeof($error) && $submit) { $user->optionset('sig_bbcode', $enable_bbcode); -- cgit v1.2.1 From aa3c5286cd572a5dd695a5d60932d52c7b89fe5c Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Thu, 5 May 2016 06:09:11 -0400 Subject: [ticket/14624] Move event so it actually works PHPBB3-14624 --- phpBB/includes/ucp/ucp_profile.php | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 3e21618b27..fa60b2ea30 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -479,19 +479,6 @@ class ucp_profile { $message_parser = new parse_message($signature); - // Allowing Quote BBCode - $message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, $config['allow_sig_links'], true, 'sig'); - - if (sizeof($message_parser->warn_msg)) - { - $error[] = implode('
', $message_parser->warn_msg); - } - - if (!check_form_key('ucp_sig')) - { - $error[] = 'FORM_INVALID'; - } - /** * Modify user signature on editing profile in UCP * @@ -517,6 +504,19 @@ class ucp_profile 'preview', ); extract($phpbb_dispatcher->trigger_event('core.ucp_profile_modify_signature', compact($vars))); + + // Allowing Quote BBCode + $message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, $config['allow_sig_links'], true, 'sig'); + + if (sizeof($message_parser->warn_msg)) + { + $error[] = implode('
', $message_parser->warn_msg); + } + + if (!check_form_key('ucp_sig')) + { + $error[] = 'FORM_INVALID'; + } if (!sizeof($error) && $submit) { -- cgit v1.2.1 From c3b30144e393e9b7d4085e51f520b1f4ae989929 Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Thu, 5 May 2016 06:10:56 -0400 Subject: [ticket/14624] Fix typo and phpBB version PHPBB3-14624 --- phpBB/includes/ucp/ucp_profile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index fa60b2ea30..f4a801363e 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -491,10 +491,10 @@ class ucp_profile * @var array error Any error strings * @var bool submit Whether or not the form has been sumitted * @var bool preview Whether or not the signature is being previewed - * @since 3.1.9 + * @since 3.1.10-RC1 */ $vars = array( - 'enable_bbocde', + 'enable_bbcode', 'enable_smilies', 'enable_urls', 'signature', -- cgit v1.2.1 From c0f34638193c375103ec6c75c4429583d3b0e05f Mon Sep 17 00:00:00 2001 From: Richard McGirr Date: Thu, 5 May 2016 06:42:28 -0400 Subject: [ticket/14624] Remove whitespace PHPBB3-14624 --- phpBB/includes/ucp/ucp_profile.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index f4a801363e..fcb29832d4 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -504,10 +504,10 @@ class ucp_profile 'preview', ); extract($phpbb_dispatcher->trigger_event('core.ucp_profile_modify_signature', compact($vars))); - + // Allowing Quote BBCode $message_parser->parse($enable_bbcode, $enable_urls, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, $config['allow_sig_links'], true, 'sig'); - + if (sizeof($message_parser->warn_msg)) { $error[] = implode('
', $message_parser->warn_msg); -- cgit v1.2.1