From c5ef29a6f1729ddc6cfec18247c8a4fe13b6d333 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 24 Mar 2016 10:41:43 +0100 Subject: [PATCH 1/2] [ticket/14530] Add accidentally removed sig_parsed flag This was removed by accident previously while moving from the use of the old bbcode class to the generate_test_for_display function. PHPBB3-14530 --- phpBB/viewtopic.php | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 87de7c79a4..392b336ce6 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1597,6 +1597,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) { $parse_flags = ($user_cache[$poster_id]['sig_bbcode_bitfield'] ? OPTION_FLAG_BBCODE : 0) | OPTION_FLAG_SMILIES; $user_cache[$poster_id]['sig'] = generate_text_for_display($user_cache[$poster_id]['sig'], $user_cache[$poster_id]['sig_bbcode_uid'], $user_cache[$poster_id]['sig_bbcode_bitfield'], $parse_flags, true); + $user_cache[$poster_id]['sig_parsed'] = true; } // Parse the message and subject From a66ec6eccf31b36f29c57fa9c29eafe531933606 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Thu, 24 Mar 2016 10:58:26 +0100 Subject: [PATCH 2/2] [ticket/14530] Only generate text again if sig was parsed for storage PHPBB3-14530 --- phpBB/includes/acp/acp_users.php | 5 ++++- phpBB/includes/ucp/ucp_profile.php | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 0ee6452ada..76b6275954 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -2073,7 +2073,10 @@ class acp_users // Replace "error" strings with their real, localised form $error = array_map(array($user, 'lang'), $error); - $decoded_message = generate_text_for_edit($signature, $bbcode_uid, $bbcode_bitfield); + if ($request->is_set_post('preview')) + { + $decoded_message = generate_text_for_edit($signature, $bbcode_uid, $bbcode_bitfield); + } /** @var \phpbb\controller\helper $controller_helper */ $controller_helper = $phpbb_container->get('controller.helper'); diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 4ac8e0f17d..5c0b792f6f 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -544,7 +544,10 @@ class ucp_profile // Replace "error" strings with their real, localised form $error = array_map(array($user, 'lang'), $error); - $decoded_message = generate_text_for_edit($signature, $bbcode_uid, $bbcode_bitfield); + if ($request->is_set_post('preview')) + { + $decoded_message = generate_text_for_edit($signature, $bbcode_uid, $bbcode_flags); + } /** @var \phpbb\controller\helper $controller_helper */ $controller_helper = $phpbb_container->get('controller.helper');