mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
Fixed signatures showing up no matter if you wanted it or not
git-svn-id: file:///svn/phpbb/trunk@4161 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
2e13c45371
commit
3d36530308
1 changed files with 28 additions and 33 deletions
|
@ -690,17 +690,10 @@ do
|
|||
else
|
||||
{
|
||||
$user_sig = '';
|
||||
if ($row['enable_sig'] && $row['user_sig'] && $config['allow_sig'] && $user->data['user_viewsigs'])
|
||||
if ($row['user_sig'] && $config['allow_sig'] && $user->data['user_viewsigs'])
|
||||
{
|
||||
$user_sig = $row['user_sig'];
|
||||
$bbcode_bitfield |= $row['user_sig_bbcode_bitfield'];
|
||||
|
||||
// if (!$auth->acl_get('f_html', $forum_id))
|
||||
// {
|
||||
// $user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $user_sig);
|
||||
// }
|
||||
|
||||
$user_sig = ($row['user_allowsmile'] || $config['enable_smilies']) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILE_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $user_sig) : str_replace('<img src="{SMILE_PATH}', '<img src="' . $config['smilies_path'], $user_sig);
|
||||
}
|
||||
|
||||
$user_cache[$poster_id] = array(
|
||||
|
@ -859,7 +852,7 @@ if ($bbcode_bitfield)
|
|||
$bbcode = new bbcode($bbcode_bitfield);
|
||||
}
|
||||
|
||||
foreach ($rowset as $key => $row)
|
||||
foreach ($rowset as $i => $row)
|
||||
{
|
||||
$poster_id = $row['user_id'];
|
||||
|
||||
|
@ -871,7 +864,7 @@ foreach ($rowset as $key => $row)
|
|||
{
|
||||
$template->assign_block_vars('postrow', array(
|
||||
'S_IGNORE_POST' => true,
|
||||
'S_ROW_COUNT' => $i++,
|
||||
'S_ROW_COUNT' => $i,
|
||||
|
||||
'L_IGNORE_POST' => sprintf($user->lang['POST_BELOW_KARMA'], $row['poster'], $row['user_karma'], "<a href=\"viewtopic.$phpEx$SID&f=$forum_id&p=" . $row['post_id'] . '&view=karma#' . $row['post_id'] . '">', '</a>'))
|
||||
);
|
||||
|
@ -888,7 +881,7 @@ foreach ($rowset as $key => $row)
|
|||
{
|
||||
$template->assign_block_vars('postrow', array(
|
||||
'S_IGNORE_POST' => true,
|
||||
'S_ROW_COUNT' => $i++,
|
||||
'S_ROW_COUNT' => $i,
|
||||
|
||||
'L_IGNORE_POST' => sprintf($user->lang['POST_ENCODING'], $row['poster'], '<a href="viewtopic.' . $phpEx . $SID . '&p=' . $row['post_id'] . '&view=encoding#' . $row['post_id'] . '">', '</a>'))
|
||||
);
|
||||
|
@ -898,8 +891,10 @@ foreach ($rowset as $key => $row)
|
|||
}
|
||||
|
||||
// End signature parsing, only if needed
|
||||
if ($user_cache[$poster_id]['sig'] && empty($user_cache['sig_parsed']))
|
||||
if ($row['enable_sig'] && $user_cache[$poster_id]['sig'] && empty($user_cache['sig_parsed']))
|
||||
{
|
||||
$user_cache[$poster_id]['sig'] = ($config['enable_smilies']) ? preg_replace('#<!\-\- s(.*?) \-\-><img src="\{SMILE_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '\1', $user_cache[$poster_id]['sig']) : str_replace('<img src="{SMILE_PATH}', '<img src="' . $config['smilies_path'], $user_cache[$poster_id]['sig']);
|
||||
|
||||
if ($user_cache[$poster_id]['sig_bbcode_bitfield'])
|
||||
{
|
||||
$bbcode->bbcode_second_pass($user_cache[$poster_id]['sig'], $user_cache[$poster_id]['sig_bbcode_uid'], $user_cache[$poster_id]['sig_bbcode_bitfield']);
|
||||
|
@ -989,7 +984,7 @@ foreach ($rowset as $key => $row)
|
|||
'POST_DATE' => $user->format_date($row['post_time']),
|
||||
'POST_SUBJECT' => $row['post_subject'],
|
||||
'MESSAGE' => $message,
|
||||
'SIGNATURE' => $user_cache[$poster_id]['sig'],
|
||||
'SIGNATURE' => ($row['enable_sig']) ? $user_cache[$poster_id]['sig'] : '',
|
||||
'EDITED_MESSAGE'=> $l_edited_by,
|
||||
|
||||
'RATING' => $rating,
|
||||
|
@ -1023,7 +1018,7 @@ foreach ($rowset as $key => $row)
|
|||
'U_MINI_POST' => "viewtopic.$phpEx$SID&p=" . $row['post_id'] . '#' . $row['post_id'],
|
||||
'U_POST_ID' => ($unread_post_id == $row['post_id']) ? 'unread' : $row['post_id'],
|
||||
|
||||
'S_ROW_COUNT' => $i++,
|
||||
'S_ROW_COUNT' => $i,
|
||||
'S_CAN_RATE' => ($auth->acl_get('f_rate', $forum_id) && $row['post_approved'] && !$row['post_reported'] && $poster_id != $user->data['user_id'] && $poster_id != ANONYMOUS) ? true : false,
|
||||
'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? TRUE : FALSE,
|
||||
'S_POST_UNAPPROVED' => ($row['post_approved']) ? FALSE : TRUE,
|
||||
|
@ -1037,7 +1032,7 @@ foreach ($rowset as $key => $row)
|
|||
display_attachments($attachments[$row['post_id']], $update_count);
|
||||
}
|
||||
|
||||
unset($rowset[$key]);
|
||||
unset($rowset[$i]);
|
||||
unset($attachments[$row['post_id']]);
|
||||
}
|
||||
unset($rowset);
|
||||
|
|
Loading…
Add table
Reference in a new issue