mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/16138] Use array to pass parameters to append_sid()
PHPBB3-16138
This commit is contained in:
parent
6a0b1333da
commit
3f518c9263
1 changed files with 5 additions and 4 deletions
|
@ -2541,23 +2541,24 @@ function submit_post($mode, $subject, $username, $topic_type, &$poll_ary, &$data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$params = $add_anchor = '';
|
$params = [];
|
||||||
|
$add_anchor = '';
|
||||||
|
|
||||||
if ($post_visibility == ITEM_APPROVED ||
|
if ($post_visibility == ITEM_APPROVED ||
|
||||||
($auth->acl_get('m_softdelete', $data_ary['forum_id']) && $post_visibility == ITEM_DELETED) ||
|
($auth->acl_get('m_softdelete', $data_ary['forum_id']) && $post_visibility == ITEM_DELETED) ||
|
||||||
($auth->acl_get('m_approve', $data_ary['forum_id']) && in_array($post_visibility, array(ITEM_UNAPPROVED, ITEM_REAPPROVE))))
|
($auth->acl_get('m_approve', $data_ary['forum_id']) && in_array($post_visibility, array(ITEM_UNAPPROVED, ITEM_REAPPROVE))))
|
||||||
{
|
{
|
||||||
$params .= '&t=' . $data_ary['topic_id'];
|
$params['t'] = $data_ary['topic_id'];
|
||||||
|
|
||||||
if ($mode != 'post')
|
if ($mode != 'post')
|
||||||
{
|
{
|
||||||
$params .= '&p=' . $data_ary['post_id'];
|
$params['p'] = $data_ary['post_id'];
|
||||||
$add_anchor = '#p' . $data_ary['post_id'];
|
$add_anchor = '#p' . $data_ary['post_id'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ($mode != 'post' && $post_mode != 'edit_first_post' && $post_mode != 'edit_topic')
|
else if ($mode != 'post' && $post_mode != 'edit_first_post' && $post_mode != 'edit_topic')
|
||||||
{
|
{
|
||||||
$params .= '&t=' . $data_ary['topic_id'];
|
$params['t'] = $data_ary['topic_id'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$url = (!$params) ? "{$phpbb_root_path}viewforum.$phpEx" : "{$phpbb_root_path}viewtopic.$phpEx";
|
$url = (!$params) ? "{$phpbb_root_path}viewforum.$phpEx" : "{$phpbb_root_path}viewtopic.$phpEx";
|
||||||
|
|
Loading…
Add table
Reference in a new issue