mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
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
This commit is contained in:
parent
0df3802cfb
commit
b4568af559
7 changed files with 147 additions and 144 deletions
|
@ -548,12 +548,12 @@
|
||||||
var text_name = 'signature';
|
var text_name = 'signature';
|
||||||
|
|
||||||
// Define the bbCode tags
|
// Define the bbCode tags
|
||||||
bbcode = new Array();
|
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]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
|
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]'<!-- BEGIN custom_tags -->, {custom_tags.BBCODE_NAME}<!-- END custom_tags -->);
|
||||||
imageTag = false;
|
imageTag = false;
|
||||||
|
|
||||||
// Helpline messages
|
// Helpline messages
|
||||||
var help_line = {
|
var help_line = {
|
||||||
b: '{LA_BBCODE_B_HELP}',
|
b: '{LA_BBCODE_B_HELP}',
|
||||||
i: '{LA_BBCODE_I_HELP}',
|
i: '{LA_BBCODE_I_HELP}',
|
||||||
u: '{LA_BBCODE_U_HELP}',
|
u: '{LA_BBCODE_U_HELP}',
|
||||||
|
@ -572,7 +572,7 @@ var help_line = {
|
||||||
<!-- BEGIN custom_tags -->
|
<!-- BEGIN custom_tags -->
|
||||||
,cb_{custom_tags.BBCODE_ID}: '{custom_tags.BBCODE_HELPLINE}'
|
,cb_{custom_tags.BBCODE_ID}: '{custom_tags.BBCODE_HELPLINE}'
|
||||||
<!-- END custom_tags -->
|
<!-- END custom_tags -->
|
||||||
}
|
}
|
||||||
|
|
||||||
//-->
|
//-->
|
||||||
</script>
|
</script>
|
||||||
|
@ -626,7 +626,9 @@ var help_line = {
|
||||||
</div>
|
</div>
|
||||||
<p><input type="text" name="helpbox" value="{L_STYLES_TIP}" class="full" style="border: 0; background: none;" /></p>
|
<p><input type="text" name="helpbox" value="{L_STYLES_TIP}" class="full" style="border: 0; background: none;" /></p>
|
||||||
<div style="text-align: left;"><textarea name="signature" rows="10" cols="60" style="width: 80%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></div>
|
<div style="text-align: left;"><textarea name="signature" rows="10" cols="60" style="width: 80%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></div>
|
||||||
<div><!-- IF S_BBCODE_ALLOWED -->
|
|
||||||
|
<div>
|
||||||
|
<!-- IF S_BBCODE_ALLOWED -->
|
||||||
<input type="checkbox" class="radio" name="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE}
|
<input type="checkbox" class="radio" name="disable_bbcode"{S_BBCODE_CHECKED} /> {L_DISABLE_BBCODE}
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<!-- IF S_SMILIES_ALLOWED -->
|
<!-- IF S_SMILIES_ALLOWED -->
|
||||||
|
|
|
@ -1477,10 +1477,10 @@ class acp_users
|
||||||
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||||
include_once($phpbb_root_path . 'includes/functions_display.' . $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_bbcode = ($config['allow_sig_bbcode']) ? ((request_var('disable_bbcode', !$user->optionget('bbcode'))) ? false : true) : false;
|
||||||
$enable_smilies = ($config['allow_sig_smilies']) ? request_var('enable_smilies', $this->optionget($user_row, 'smilies')) : false;
|
$enable_smilies = ($config['allow_sig_smilies']) ? ((request_var('disable_smilies', !$user->optionget('smilies'))) ? false : true) : false;
|
||||||
$enable_urls = request_var('enable_urls', true);
|
$enable_urls = ($config['allow_sig_links']) ? ((request_var('disable_magic_url', false)) ? false : true) : false;
|
||||||
$signature = utf8_normalize_nfc(request_var('signature', $user_row['user_sig'], true));
|
$signature = utf8_normalize_nfc(request_var('signature', (string) $user_row['user_sig'], true));
|
||||||
|
|
||||||
$preview = (isset($_POST['preview'])) ? true : false;
|
$preview = (isset($_POST['preview'])) ? true : false;
|
||||||
|
|
||||||
|
@ -1491,7 +1491,7 @@ class acp_users
|
||||||
$message_parser = new parse_message($signature);
|
$message_parser = new parse_message($signature);
|
||||||
|
|
||||||
// Allowing Quote BBCode
|
// 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))
|
if (sizeof($message_parser->warn_msg))
|
||||||
{
|
{
|
||||||
|
@ -1535,9 +1535,9 @@ class acp_users
|
||||||
'SIGNATURE' => $signature,
|
'SIGNATURE' => $signature,
|
||||||
'SIGNATURE_PREVIEW' => $signature_preview,
|
'SIGNATURE_PREVIEW' => $signature_preview,
|
||||||
|
|
||||||
'S_BBCODE_CHECKED' => (!$enable_bbcode) ? 'checked="checked"' : '',
|
'S_BBCODE_CHECKED' => (!$enable_bbcode) ? ' checked="checked"' : '',
|
||||||
'S_SMILIES_CHECKED' => (!$enable_smilies) ? 'checked="checked"' : '',
|
'S_SMILIES_CHECKED' => (!$enable_smilies) ? ' checked="checked"' : '',
|
||||||
'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? 'checked="checked"' : '',
|
'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? ' checked="checked"' : '',
|
||||||
|
|
||||||
'BBCODE_STATUS' => ($config['allow_sig_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>'),
|
'BBCODE_STATUS' => ($config['allow_sig_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>'),
|
||||||
'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
|
'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
/**
|
/**
|
||||||
* ucp_profile
|
* ucp_profile
|
||||||
* Changing profile settings
|
* Changing profile settings
|
||||||
|
*
|
||||||
|
* @todo what about pertaining user_sig_options?
|
||||||
* @package ucp
|
* @package ucp
|
||||||
*/
|
*/
|
||||||
class ucp_profile
|
class ucp_profile
|
||||||
|
@ -403,21 +405,22 @@ class ucp_profile
|
||||||
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
include($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
||||||
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
|
||||||
|
|
||||||
$enable_bbcode = ($config['allow_sig_bbcode']) ? request_var('enable_bbcode', $user->optionget('bbcode')) : false;
|
$enable_bbcode = ($config['allow_sig_bbcode']) ? ((request_var('disable_bbcode', !$user->optionget('bbcode'))) ? false : true) : false;
|
||||||
$enable_smilies = ($config['allow_sig_smilies']) ? request_var('enable_smilies', $user->optionget('smilies')) : false;
|
$enable_smilies = ($config['allow_sig_smilies']) ? ((request_var('disable_smilies', !$user->optionget('smilies'))) ? false : true) : false;
|
||||||
$enable_urls = request_var('enable_urls', true);
|
$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));
|
$signature = utf8_normalize_nfc(request_var('signature', (string) $user->data['user_sig'], true));
|
||||||
|
|
||||||
if ($submit || $preview)
|
if ($submit || $preview)
|
||||||
{
|
{
|
||||||
include($phpbb_root_path . 'includes/message_parser.'.$phpEx);
|
include($phpbb_root_path . 'includes/message_parser.' . $phpEx);
|
||||||
|
|
||||||
if (!sizeof($error))
|
if (!sizeof($error))
|
||||||
{
|
{
|
||||||
$message_parser = new parse_message($signature);
|
$message_parser = new parse_message($signature);
|
||||||
|
|
||||||
// Allowing Quote BBCode
|
// 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))
|
if (sizeof($message_parser->warn_msg))
|
||||||
{
|
{
|
||||||
|
@ -461,9 +464,9 @@ class ucp_profile
|
||||||
'SIGNATURE' => $signature,
|
'SIGNATURE' => $signature,
|
||||||
'SIGNATURE_PREVIEW' => $signature_preview,
|
'SIGNATURE_PREVIEW' => $signature_preview,
|
||||||
|
|
||||||
'S_BBCODE_CHECKED' => (!$enable_bbcode) ? 'checked="checked"' : '',
|
'S_BBCODE_CHECKED' => (!$enable_bbcode) ? ' checked="checked"' : '',
|
||||||
'S_SMILIES_CHECKED' => (!$enable_smilies) ? 'checked="checked"' : '',
|
'S_SMILIES_CHECKED' => (!$enable_smilies) ? ' checked="checked"' : '',
|
||||||
'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? 'checked="checked"' : '',
|
'S_MAGIC_URL_CHECKED' => (!$enable_urls) ? ' checked="checked"' : '',
|
||||||
|
|
||||||
'BBCODE_STATUS' => ($config['allow_sig_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>'),
|
'BBCODE_STATUS' => ($config['allow_sig_bbcode']) ? sprintf($user->lang['BBCODE_IS_ON'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>') : sprintf($user->lang['BBCODE_IS_OFF'], '<a href="' . append_sid("{$phpbb_root_path}faq.$phpEx", 'mode=bbcode') . '">', '</a>'),
|
||||||
'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
|
'SMILIES_STATUS' => ($config['allow_sig_smilies']) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'],
|
||||||
|
|
|
@ -122,9 +122,8 @@ class ucp_register
|
||||||
|
|
||||||
$data = array(
|
$data = array(
|
||||||
'username' => request_var('username', '', true),
|
'username' => request_var('username', '', true),
|
||||||
'password_confirm' => request_var('password_confirm', '', true),
|
|
||||||
'new_password' => request_var('new_password', '', 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' => strtolower(request_var('email', '')),
|
||||||
'email_confirm' => strtolower(request_var('email_confirm', '')),
|
'email_confirm' => strtolower(request_var('email_confirm', '')),
|
||||||
'confirm_code' => request_var('confirm_code', ''),
|
'confirm_code' => request_var('confirm_code', ''),
|
||||||
|
|
|
@ -111,7 +111,7 @@ $lang = array_merge($lang, array(
|
||||||
'CONFIRM_EMAIL' => 'Confirm email address',
|
'CONFIRM_EMAIL' => 'Confirm email address',
|
||||||
'CONFIRM_EMAIL_EXPLAIN' => 'You only need to specify this if you are changing your 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_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',
|
'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_BIRTHDAY' => 'To continue with the registration procedure please tell us when you were born.',
|
||||||
'COPPA_COMPLIANCE' => 'COPPA compliance',
|
'COPPA_COMPLIANCE' => 'COPPA compliance',
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<tr valign="middle" align="left">
|
<tr valign="middle" align="left">
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
<!--
|
<!--
|
||||||
|
@ -76,8 +76,8 @@
|
||||||
<option value="24">{L_FONT_HUGE}</option>
|
<option value="24">{L_FONT_HUGE}</option>
|
||||||
</select></span>
|
</select></span>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- IF .custom_tags -->
|
<!-- IF .custom_tags -->
|
||||||
<tr valign="middle" align="left">
|
<tr valign="middle" align="left">
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<!-- BEGIN custom_tags -->
|
<!-- BEGIN custom_tags -->
|
||||||
|
@ -85,10 +85,10 @@
|
||||||
<!-- END custom_tags -->
|
<!-- END custom_tags -->
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
<tr>
|
<tr>
|
||||||
<td><input type="text" readonly="readonly" name="helpbox" style="width:100%" maxlength="100" class="helpline" value="{L_STYLES_TIP}" /></td>
|
<td<!-- IF $S_SIGNATURE or S_EDIT_DRAFT --> colspan="2"<!-- ENDIF -->><input type="text" readonly="readonly" name="helpbox" style="width:100%" maxlength="100" class="helpline" value="{L_STYLES_TIP}" /></td>
|
||||||
<!-- IF not $S_SIGNATURE and not S_EDIT_DRAFT -->
|
<!-- IF not $S_SIGNATURE and not S_EDIT_DRAFT -->
|
||||||
<td class="genmed" align="center">{L_FONT_COLOR}</td>
|
<td class="genmed" align="center">{L_FONT_COLOR}</td>
|
||||||
<!-- ENDIF -->
|
<!-- ENDIF -->
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -24,14 +24,13 @@
|
||||||
-->
|
-->
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<table cellspacing="0" cellpadding="2" border="0">
|
<table cellspacing="0" cellpadding="2" border="0" width="99%">
|
||||||
<!-- INCLUDE posting_buttons.html -->
|
<!-- INCLUDE posting_buttons.html -->
|
||||||
<tr>
|
<tr>
|
||||||
<td><textarea class="post" name="signature" rows="10" cols="76" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></td>
|
<td colspan="2"><textarea class="post" name="signature" rows="10" cols="76" style="width: 90%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></td>
|
||||||
<td></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="9">
|
<td colspan="2">
|
||||||
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
<table cellspacing="0" cellpadding="0" border="0" width="100%">
|
||||||
<tr>
|
<tr>
|
||||||
<td align="left">
|
<td align="left">
|
||||||
|
|
Loading…
Add table
Reference in a new issue