phpBB

Code Changes

File: posting.php

  Unmodified   Added   Modified   Removed
Line 196Line 196
{
login_forum_box(array(
'forum_id' => $forum_id,

{
login_forum_box(array(
'forum_id' => $forum_id,

 
		'forum_name'		=> $post_data['forum_name'],

		'forum_password'	=> $post_data['forum_password'])
);
}

		'forum_password'	=> $post_data['forum_password'])
);
}

Line 1018Line 1019
					$forum_type = (int) $db->sql_fetchfield('forum_type');
$db->sql_freeresult($result);


					$forum_type = (int) $db->sql_fetchfield('forum_type');
$db->sql_freeresult($result);


					if ($forum_type != FORUM_POST || !$auth->acl_get('f_post', $to_forum_id) || (!$auth->acl_get('m_approve', $to_forum_id) && !$auth->acl_get('f_noapprove', $to_forum_id)))

					if ($forum_type != FORUM_POST || !$auth->acl_get('f_post', $to_forum_id) || !$auth->acl_get('f_noapprove', $to_forum_id))

					{
$to_forum_id = 0;
}

					{
$to_forum_id = 0;
}

Line 1129Line 1130
				$data['topic_replies_real'] = $post_data['topic_replies_real'];
$data['topic_replies'] = $post_data['topic_replies'];
}

				$data['topic_replies_real'] = $post_data['topic_replies_real'];
$data['topic_replies'] = $post_data['topic_replies'];
}

 

// Only return the username when it is either a guest posting or we are editing a post and
// the username was supplied; otherwise post_data might hold the data of the post that is
// being quoted (which could result in the username being returned being that of the quoted
// post's poster, not the poster of the current post). See: PHPBB3-11769 for more information.
$post_author_name = ((!$user->data['is_registered'] || $mode == 'edit') && $post_data['username'] !== '') ? $post_data['username'] : '';


// The last parameter tells submit_post if search indexer has to be run


// The last parameter tells submit_post if search indexer has to be run

			$redirect_url = submit_post($mode, $post_data['post_subject'], $post_data['username'], $post_data['topic_type'], $poll, $data, $update_message, ($update_message || $update_subject) ? true : false);

			$redirect_url = submit_post($mode, $post_data['post_subject'], $post_author_name, $post_data['topic_type'], $poll, $data, $update_message, ($update_message || $update_subject) ? true : false);


if ($config['enable_post_confirm'] && !$user->data['is_registered'] && (isset($captcha) && $captcha->is_solved() === true) && ($mode == 'post' || $mode == 'reply' || $mode == 'quote'))
{
$captcha->reset();
}



if ($config['enable_post_confirm'] && !$user->data['is_registered'] && (isset($captcha) && $captcha->is_solved() === true) && ($mode == 'post' || $mode == 'reply' || $mode == 'quote'))
{
$captcha->reset();
}


			// Check the permissions for post approval. Moderators are not affected.
if ((!$auth->acl_get('f_noapprove', $data['forum_id']) && !$auth->acl_get('m_approve', $data['forum_id']) && empty($data['force_approved_state'])) || (isset($data['force_approved_state']) && !$data['force_approved_state']))


			// Check the permissions for post approval.
// Moderators must go through post approval like ordinary users.
if ((!$auth->acl_get('f_noapprove', $data['forum_id']) && empty($data['force_approved_state'])) || (isset($data['force_approved_state']) && !$data['force_approved_state']))

			{
meta_refresh(10, $redirect_url);
$message = ($mode == 'edit') ? $user->lang['POST_EDITED_MOD'] : $user->lang['POST_STORED_MOD'];

			{
meta_refresh(10, $redirect_url);
$message = ($mode == 'edit') ? $user->lang['POST_EDITED_MOD'] : $user->lang['POST_STORED_MOD'];

Line 1214Line 1222
			'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']))
);


			'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']))
);


		$parse_poll->message = implode("\n", $post_data['poll_options']);




		$preview_poll_options = array();
foreach ($post_data['poll_options'] as $poll_option)
{
$parse_poll->message = $poll_option;

		$parse_poll->format_display($post_data['enable_bbcode'], $post_data['enable_urls'], $post_data['enable_smilies']);

		$parse_poll->format_display($post_data['enable_bbcode'], $post_data['enable_urls'], $post_data['enable_smilies']);

		$preview_poll_options = explode('<br />', $parse_poll->message);


			$preview_poll_options[] = $parse_poll->message;
}

		unset($parse_poll);

foreach ($preview_poll_options as $key => $option)

		unset($parse_poll);

foreach ($preview_poll_options as $key => $option)