From aef857c98d518260ba428dd31c054e910f6f54fc Mon Sep 17 00:00:00 2001 From: Jim Wigginton Date: Mon, 2 Mar 2009 23:16:35 +0000 Subject: Fixed bug # 41435 Authorised by: acydburn git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9356 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index 1666342c9b..601bc2ab26 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -96,7 +96,8 @@ switch ($mode) AND t.topic_id = p.topic_id AND u.user_id = p.poster_id AND (f.forum_id = t.forum_id - OR f.forum_id = $forum_id)"; + OR f.forum_id = $forum_id)" . + (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND p.post_approved = 1'); break; case 'smilies': -- cgit v1.2.1 From 0d4a76a8756b28a99e3ab95beb3bd9836047bd1b Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Wed, 11 Mar 2009 17:11:10 +0000 Subject: Hide font size options which are bigger than the allowed size in the editor. #42615 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9365 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index 601bc2ab26..58d834dd21 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1287,6 +1287,7 @@ $template->assign_vars(array( 'FLASH_STATUS' => ($flash_status) ? $user->lang['FLASH_IS_ON'] : $user->lang['FLASH_IS_OFF'], 'SMILIES_STATUS' => ($smilies_status) ? $user->lang['SMILIES_ARE_ON'] : $user->lang['SMILIES_ARE_OFF'], 'URL_STATUS' => ($bbcode_status && $url_status) ? $user->lang['URL_IS_ON'] : $user->lang['URL_IS_OFF'], + 'MAX_FONT_SIZE' => (int) $config['max_post_font_size'], 'MINI_POST_IMG' => $user->img('icon_post_target', $user->lang['POST']), 'POST_DATE' => ($post_data['post_time']) ? $user->format_date($post_data['post_time']) : '', 'ERROR' => (sizeof($error)) ? implode('
', $error) : '', -- cgit v1.2.1 From 777c7538902f540cdd0d835a9ffaf4107f46899f Mon Sep 17 00:00:00 2001 From: Jim Wigginton Date: Tue, 24 Mar 2009 16:43:52 +0000 Subject: =?UTF-8?q?Fixed=20bug=20#40565=20=E2=80=93=20Cancel=20when=20repl?= =?UTF-8?q?ying=20to=20global=20announcement=20redirects=20to=20first=20fo?= =?UTF-8?q?rum=20-=20not=20to=20the=20current=20forum=20Authorised=20by:?= =?UTF-8?q?=20acydburn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9406 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index 58d834dd21..0da99b3c56 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -49,7 +49,8 @@ $current_time = time(); // Was cancel pressed? If so then redirect to the appropriate page if ($cancel || ($current_time - $lastclick < 2 && $submit)) { - $redirect = ($post_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", 'p=' . $post_id) . '#p' . $post_id : (($topic_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", 't=' . $topic_id) : (($forum_id) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) : append_sid("{$phpbb_root_path}index.$phpEx"))); + $f = ($forum_id) ? 'f=' . $forum_id . '&' : ''; + $redirect = ($post_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", $f . 'p=' . $post_id) . '#p' . $post_id : (($topic_id) ? append_sid("{$phpbb_root_path}viewtopic.$phpEx", $f . 't=' . $topic_id) : (($forum_id) ? append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id) : append_sid("{$phpbb_root_path}index.$phpEx"))); redirect($redirect); } -- cgit v1.2.1 From cda9e5e9ec0dfe9c3e0a04809ffc5d0099020046 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 11 Apr 2009 09:11:08 +0000 Subject: a language alteration for captchas. Added min/max captcha chars constants and changed the length from 5-8 to 4-7 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9437 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index 0da99b3c56..1342b74642 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1229,7 +1229,7 @@ if ($config['enable_post_confirm'] && !$user->data['is_registered'] && $solved_c $db->sql_query($sql); // Generate code - $code = gen_rand_string(mt_rand(5, 8)); + $code = gen_rand_string(mt_rand(CAPTCHA_MIN_CHARS, CAPTCHA_MAX_CHARS)); $confirm_id = md5(unique_id($user->ip)); $seed = hexdec(substr(unique_id(), 4, 10)); -- cgit v1.2.1 From e3bdaea2656f788dd58e04d62896435246b6f23b Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 18 Apr 2009 17:22:41 +0000 Subject: Ability to vote in poll is now required for the ability to change existing vote. (Bug #38925) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9470 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index 1342b74642..cc98e9c496 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -648,7 +648,7 @@ if ($submit || $preview || $refresh) $post_data['poll_length'] = request_var('poll_length', 0); $post_data['poll_option_text'] = utf8_normalize_nfc(request_var('poll_option_text', '', true)); $post_data['poll_max_options'] = request_var('poll_max_options', 1); - $post_data['poll_vote_change'] = ($auth->acl_get('f_votechg', $forum_id) && isset($_POST['poll_vote_change'])) ? 1 : 0; + $post_data['poll_vote_change'] = ($auth->acl_get('f_votechg', $forum_id) && $auth->acl_get('f_vote', $forum_id) && isset($_POST['poll_vote_change'])) ? 1 : 0; } // If replying/quoting and last post id has changed @@ -1343,7 +1343,7 @@ if (($mode == 'post' || ($mode == 'edit' && $post_id == $post_data['topic_first_ { $template->assign_vars(array( 'S_SHOW_POLL_BOX' => true, - 'S_POLL_VOTE_CHANGE' => ($auth->acl_get('f_votechg', $forum_id)), + 'S_POLL_VOTE_CHANGE' => ($auth->acl_get('f_votechg', $forum_id) && $auth->acl_get('f_vote', $forum_id)), 'S_POLL_DELETE' => ($mode == 'edit' && sizeof($post_data['poll_options']) && ((!$post_data['poll_last_vote'] && $post_data['poster_id'] == $user->data['user_id'] && $auth->acl_get('f_delete', $forum_id)) || $auth->acl_get('m_delete', $forum_id))), 'S_POLL_DELETE_CHECKED' => (!empty($poll_delete)) ? true : false, -- cgit v1.2.1 From 4ea3402f9363c9259881bc8ea6ce7fc6cb212657 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 30 Apr 2009 08:15:32 +0000 Subject: Only use forum id supplied for posting if global announcement detected. (Reported by nickvergessen) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9499 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/posting.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'phpBB/posting.php') diff --git a/phpBB/posting.php b/phpBB/posting.php index cc98e9c496..c16c55111a 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -75,6 +75,16 @@ switch ($mode) trigger_error('NO_TOPIC'); } + // Force forum id + $sql = 'SELECT forum_id + FROM ' . TOPICS_TABLE . ' + WHERE topic_id = ' . $topic_id; + $result = $db->sql_query($sql); + $f_id = (int) $db->sql_fetchfield('forum_id'); + $db->sql_freeresult($result); + + $forum_id = (!$f_id) ? $forum_id : $f_id; + $sql = 'SELECT f.*, t.* FROM ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . " f WHERE t.topic_id = $topic_id @@ -91,6 +101,16 @@ switch ($mode) trigger_error('NO_POST'); } + // Force forum id + $sql = 'SELECT forum_id + FROM ' . POSTS_TABLE . ' + WHERE post_id = ' . $post_id; + $result = $db->sql_query($sql); + $f_id = (int) $db->sql_fetchfield('forum_id'); + $db->sql_freeresult($result); + + $forum_id = (!$f_id) ? $forum_id : $f_id; + $sql = 'SELECT f.*, t.*, p.*, u.username, u.username_clean, u.user_sig, u.user_sig_bbcode_uid, u.user_sig_bbcode_bitfield FROM ' . POSTS_TABLE . ' p, ' . TOPICS_TABLE . ' t, ' . FORUMS_TABLE . ' f, ' . USERS_TABLE . " u WHERE p.post_id = $post_id -- cgit v1.2.1