From b4568af559bc20e305a37105299bdb0147136136 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 28 Jan 2007 13:09:50 +0000 Subject: [PATCH] fixing a signature bug being there for more than two years [Bug #7436] git-svn-id: file:///svn/phpbb/trunk@6943 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/adm/style/acp_users.html | 56 +++--- phpBB/includes/acp/acp_users.php | 16 +- phpBB/includes/ucp/ucp_profile.php | 23 ++- phpBB/includes/ucp/ucp_register.php | 3 +- phpBB/language/en/ucp.php | 2 +- .../subSilver/template/posting_buttons.html | 184 +++++++++--------- .../template/ucp_profile_signature.html | 7 +- 7 files changed, 147 insertions(+), 144 deletions(-) diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index 712602b7bd..d44832b9b7 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -548,31 +548,31 @@ var text_name = 'signature'; // Define the bbCode tags -bbcode = new Array(); -bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]', {custom_tags.BBCODE_NAME}); -imageTag = false; + bbcode = new Array(); + bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','[quote]','[/quote]','[code]','[/code]','[list]','[/list]','[list=]','[/list]','[img]','[/img]','[url]','[/url]','[flash=]', '[/flash]','[size=]','[/size]', {custom_tags.BBCODE_NAME}); + imageTag = false; -// Helpline messages -var help_line = { - b: '{LA_BBCODE_B_HELP}', - i: '{LA_BBCODE_I_HELP}', - u: '{LA_BBCODE_U_HELP}', - q: '{LA_BBCODE_Q_HELP}', - c: '{LA_BBCODE_C_HELP}', - l: '{LA_BBCODE_L_HELP}', - o: '{LA_BBCODE_O_HELP}', - p: '{LA_BBCODE_P_HELP}', - w: '{LA_BBCODE_W_HELP}', - s: '{LA_BBCODE_S_HELP}', - f: '{LA_BBCODE_F_HELP}', - e: '{LA_BBCODE_E_HELP}', - d: '{LA_BBCODE_D_HELP}', - t: '{LA_BBCODE_T_HELP}', - tip: '{L_STYLES_TIP}' - - ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.BBCODE_HELPLINE}' - -} + // Helpline messages + var help_line = { + b: '{LA_BBCODE_B_HELP}', + i: '{LA_BBCODE_I_HELP}', + u: '{LA_BBCODE_U_HELP}', + q: '{LA_BBCODE_Q_HELP}', + c: '{LA_BBCODE_C_HELP}', + l: '{LA_BBCODE_L_HELP}', + o: '{LA_BBCODE_O_HELP}', + p: '{LA_BBCODE_P_HELP}', + w: '{LA_BBCODE_W_HELP}', + s: '{LA_BBCODE_S_HELP}', + f: '{LA_BBCODE_F_HELP}', + e: '{LA_BBCODE_E_HELP}', + d: '{LA_BBCODE_D_HELP}', + t: '{LA_BBCODE_T_HELP}', + tip: '{L_STYLES_TIP}' + + ,cb_{custom_tags.BBCODE_ID}: '{custom_tags.BBCODE_HELPLINE}' + + } //--> @@ -625,8 +625,10 @@ var help_line = {

-
-
+
+ +
+   {L_DISABLE_BBCODE}   @@ -636,7 +638,7 @@ var help_line = {   {L_DISABLE_MAGIC_URL}  

{L_OPTIONS}: {BBCODE_STATUS} :: {IMG_STATUS} :: {FLASH_STATUS} :: {URL_STATUS} :: {SMILIES_STATUS} -
+
diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index 9a8184453c..24fd028bad 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -1477,10 +1477,10 @@ class acp_users include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx); include_once($phpbb_root_path . 'includes/functions_display.' . $phpEx); - $enable_bbcode = ($config['allow_sig_bbcode']) ? request_var('enable_bbcode', $this->optionget($user_row, 'bbcode')) : false; - $enable_smilies = ($config['allow_sig_smilies']) ? request_var('enable_smilies', $this->optionget($user_row, 'smilies')) : false; - $enable_urls = request_var('enable_urls', true); - $signature = utf8_normalize_nfc(request_var('signature', $user_row['user_sig'], true)); + $enable_bbcode = ($config['allow_sig_bbcode']) ? ((request_var('disable_bbcode', !$user->optionget('bbcode'))) ? false : true) : false; + $enable_smilies = ($config['allow_sig_smilies']) ? ((request_var('disable_smilies', !$user->optionget('smilies'))) ? false : true) : false; + $enable_urls = ($config['allow_sig_links']) ? ((request_var('disable_magic_url', false)) ? false : true) : false; + $signature = utf8_normalize_nfc(request_var('signature', (string) $user_row['user_sig'], true)); $preview = (isset($_POST['preview'])) ? true : false; @@ -1491,7 +1491,7 @@ class acp_users $message_parser = new parse_message($signature); // Allowing Quote BBCode - $message_parser->parse($enable_bbcode, ($config['allow_sig_links']) ? $enable_urls : false, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, $config['allow_sig_links'], true, 'sig'); + $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)) { @@ -1535,9 +1535,9 @@ class acp_users 'SIGNATURE' => $signature, 'SIGNATURE_PREVIEW' => $signature_preview, - 'S_BBCODE_CHECKED' => (!$enable_bbcode) ? 'checked="checked"' : '', - 'S_SMILIES_CHECKED' => (!$enable_smilies) ? 'checked="checked"' : '', - 'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? 'checked="checked"' : '', + 'S_BBCODE_CHECKED' => (!$enable_bbcode) ? ' checked="checked"' : '', + 'S_SMILIES_CHECKED' => (!$enable_smilies) ? ' checked="checked"' : '', + 'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? ' checked="checked"' : '', 'BBCODE_STATUS' => ($config['allow_sig_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], '', '') : sprintf($user->lang['BBCODE_IS_OFF'], '', ''), 'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'], diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 48a6aba9cf..e730368e20 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -11,6 +11,8 @@ /** * ucp_profile * Changing profile settings +* +* @todo what about pertaining user_sig_options? * @package ucp */ class ucp_profile @@ -403,22 +405,23 @@ class ucp_profile include($phpbb_root_path . 'includes/functions_posting.' . $phpEx); include($phpbb_root_path . 'includes/functions_display.' . $phpEx); - $enable_bbcode = ($config['allow_sig_bbcode']) ? request_var('enable_bbcode', $user->optionget('bbcode')) : false; - $enable_smilies = ($config['allow_sig_smilies']) ? request_var('enable_smilies', $user->optionget('smilies')) : false; - $enable_urls = request_var('enable_urls', true); + $enable_bbcode = ($config['allow_sig_bbcode']) ? ((request_var('disable_bbcode', !$user->optionget('bbcode'))) ? false : true) : false; + $enable_smilies = ($config['allow_sig_smilies']) ? ((request_var('disable_smilies', !$user->optionget('smilies'))) ? false : true) : false; + $enable_urls = ($config['allow_sig_links']) ? ((request_var('disable_magic_url', false)) ? false : true) : false; + $signature = utf8_normalize_nfc(request_var('signature', (string) $user->data['user_sig'], true)); if ($submit || $preview) { - include($phpbb_root_path . 'includes/message_parser.'.$phpEx); + include($phpbb_root_path . 'includes/message_parser.' . $phpEx); if (!sizeof($error)) { $message_parser = new parse_message($signature); // Allowing Quote BBCode - $message_parser->parse($enable_bbcode, ($config['allow_sig_links']) ? $enable_urls : false, $enable_smilies, $config['allow_sig_img'], $config['allow_sig_flash'], true, $config['allow_sig_links'], true, 'sig'); - + $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); @@ -441,7 +444,7 @@ class ucp_profile trigger_error($message); } } - + // Replace "error" strings with their real, localised form $error = preg_replace('#^([A-Z_]+)$#e', "(!empty(\$user->lang['\\1'])) ? \$user->lang['\\1'] : '\\1'", $error); } @@ -461,9 +464,9 @@ class ucp_profile 'SIGNATURE' => $signature, 'SIGNATURE_PREVIEW' => $signature_preview, - 'S_BBCODE_CHECKED' => (!$enable_bbcode) ? 'checked="checked"' : '', - 'S_SMILIES_CHECKED' => (!$enable_smilies) ? 'checked="checked"' : '', - 'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? 'checked="checked"' : '', + 'S_BBCODE_CHECKED' => (!$enable_bbcode) ? ' checked="checked"' : '', + 'S_SMILIES_CHECKED' => (!$enable_smilies) ? ' checked="checked"' : '', + 'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? ' checked="checked"' : '', 'BBCODE_STATUS' => ($config['allow_sig_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], '', '') : sprintf($user->lang['BBCODE_IS_OFF'], '', ''), 'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'], diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 90daa93a39..9fffdff5fd 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -122,9 +122,8 @@ class ucp_register $data = array( 'username' => request_var('username', '', true), - 'password_confirm' => request_var('password_confirm', '', true), 'new_password' => request_var('new_password', '', true), - 'cur_password' => request_var('cur_password', '', true), + 'password_confirm' => request_var('password_confirm', '', true), 'email' => strtolower(request_var('email', '')), 'email_confirm' => strtolower(request_var('email_confirm', '')), 'confirm_code' => request_var('confirm_code', ''), diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 548030b93a..4e9949482c 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -111,7 +111,7 @@ $lang = array_merge($lang, array( 'CONFIRM_EMAIL' => 'Confirm email address', 'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing your email address.', 'CONFIRM_EXPLAIN' => 'To prevent automated registrations the board administrator requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.', - 'CONFIRM_PASSWORD' => 'Confirm new password', + 'CONFIRM_PASSWORD' => 'Confirm password', 'CONFIRM_PASSWORD_EXPLAIN' => 'You only need to confirm your password if you changed it above', 'COPPA_BIRTHDAY' => 'To continue with the registration procedure please tell us when you were born.', 'COPPA_COMPLIANCE' => 'COPPA compliance', diff --git a/phpBB/styles/subSilver/template/posting_buttons.html b/phpBB/styles/subSilver/template/posting_buttons.html index 5a15a39bd6..b07f18a5ea 100644 --- a/phpBB/styles/subSilver/template/posting_buttons.html +++ b/phpBB/styles/subSilver/template/posting_buttons.html @@ -1,94 +1,94 @@ - - - - + + + + - - - - - - - - - - - - - - - - - - - - - {L_FONT_SIZE}: - - - - - - - onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')" /> - - - + + + + + + - - - - {L_FONT_COLOR} - - + + + + + + + + + + + + + + {L_FONT_SIZE}: + + + + + + + onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" onmouseout="helpline('tip')" /> + + + + + + colspan="2"> + + {L_FONT_COLOR} + + diff --git a/phpBB/styles/subSilver/template/ucp_profile_signature.html b/phpBB/styles/subSilver/template/ucp_profile_signature.html index b387723b04..b01911583d 100644 --- a/phpBB/styles/subSilver/template/ucp_profile_signature.html +++ b/phpBB/styles/subSilver/template/ucp_profile_signature.html @@ -24,14 +24,13 @@ --> - +
- - + -
+