mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
my round of bug fixes
git-svn-id: file:///svn/phpbb/trunk@7749 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -975,11 +975,22 @@ if ($submit || $preview || $refresh)
|
||||
unset($message_parser);
|
||||
|
||||
$redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message);
|
||||
$post_need_approval = (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) ? true : false;
|
||||
|
||||
meta_refresh(3, $redirect_url);
|
||||
// If the post need approval we will wait a lot longer.
|
||||
if ($post_need_approval)
|
||||
{
|
||||
meta_refresh(10, $redirect_url);
|
||||
$message = ($mode == 'edit') ? $user->lang['POST_EDITED_MOD'] : $user->lang['POST_STORED_MOD'];
|
||||
}
|
||||
else
|
||||
{
|
||||
meta_refresh(3, $redirect_url);
|
||||
|
||||
$message = ($mode == 'edit') ? 'POST_EDITED' : 'POST_STORED';
|
||||
$message = $user->lang[$message] . '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $redirect_url . '">', '</a>');
|
||||
}
|
||||
|
||||
$message = (!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id'])) ? (($mode == 'edit') ? 'POST_EDITED_MOD' : 'POST_STORED_MOD') : (($mode == 'edit') ? 'POST_EDITED' : 'POST_STORED');
|
||||
$message = $user->lang[$message] . (($auth->acl_get('f_noapprove', $data['forum_id']) || $auth->acl_get('m_approve', $data['forum_id'])) ? '<br /><br />' . sprintf($user->lang['VIEW_MESSAGE'], '<a href="' . $redirect_url . '">', '</a>') : '');
|
||||
$message .= '<br /><br />' . sprintf($user->lang['RETURN_FORUM'], '<a href="' . append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $data['forum_id']) . '">', '</a>');
|
||||
trigger_error($message);
|
||||
}
|
||||
@@ -1026,13 +1037,18 @@ if (!sizeof($error) && $preview)
|
||||
|
||||
$parse_poll->format_display($post_data['enable_bbcode'], $post_data['enable_urls'], $post_data['enable_smilies']);
|
||||
|
||||
if ($post_data['poll_length'])
|
||||
{
|
||||
$poll_end = ($post_data['poll_length'] * 86400) + (($post_data['poll_start']) ? $post_data['poll_start'] : time());
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'S_HAS_POLL_OPTIONS' => (sizeof($post_data['poll_options'])),
|
||||
'S_IS_MULTI_CHOICE' => ($post_data['poll_max_options'] > 1) ? true : false,
|
||||
|
||||
'POLL_QUESTION' => $parse_poll->message,
|
||||
|
||||
'L_POLL_LENGTH' => ($post_data['poll_length']) ? sprintf($user->lang['POLL_RUN_TILL'], $user->format_date($post_data['poll_length'] + $post_data['poll_start'])) : '',
|
||||
'L_POLL_LENGTH' => ($post_data['poll_length']) ? sprintf($user->lang['POLL_RUN_TILL'], $user->format_date($poll_end)) : '',
|
||||
'L_MAX_VOTES' => ($post_data['poll_max_options'] == 1) ? $user->lang['MAX_OPTION_SELECT'] : sprintf($user->lang['MAX_OPTIONS_SELECT'], $post_data['poll_max_options']))
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user