From 10f775cb1cc44b083373543a6c08214d1dd291f0 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 5 Feb 2007 16:24:15 +0000 Subject: only some minor fixes git-svn-id: file:///svn/phpbb/trunk@6969 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 4ef45eddc0..15058f1295 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -111,6 +111,7 @@ if ($view && !$post_id) LEFT JOIN ' . TOPICS_TABLE . " t2 ON (t2.topic_id = $topic_id AND t.forum_id = t2.forum_id) WHERE t.topic_last_post_time $sql_condition t2.topic_last_post_time " . (($auth->acl_get('m_approve', $forum_id)) ? '' : 'AND t.topic_approved = 1') . " + AND t.topic_moved_id = 0 ORDER BY t.topic_last_post_time $sql_ordering"; $result = $db->sql_query_limit($sql, 1); $row = $db->sql_fetchrow($result); -- cgit v1.2.1 From 5c6653717f0a9adce905d1417c8adb4f0f3a5b73 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 18 Feb 2007 13:42:08 +0000 Subject: fixing some bugs more mcp links for easier moderating different aspects (all, forum, topic) i may have introduced new bugs with this commit due to me having fixed some things weeks ago and some code changed in between - please report if you see something not working as expected. git-svn-id: file:///svn/phpbb/trunk@7007 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 15058f1295..1c05af3d11 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1331,8 +1331,8 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) if ($topic_data['topic_bumped'] && $row['post_id'] == $topic_data['topic_last_post_id'] && isset($user_cache[$topic_data['topic_bumper']]) ) { // It is safe to grab the username from the user cache array, we are at the last - // post and only the topic poster and last poster are allowed to bump. However, a - // check is still needed incase an admin bumped the topic (but didn't post in the topic) + // post and only the topic poster and last poster are allowed to bump. + // Admins and mods are bound to the above rules too... $l_bumped_by = '

' . sprintf($user->lang['BUMPED_BY'], $user_cache[$topic_data['topic_bumper']]['username'], $user->format_date($topic_data['topic_last_post_time'])); } else @@ -1382,9 +1382,9 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'BUMPED_MESSAGE' => $l_bumped_by, 'MINI_POST_IMG' => ($post_unread) ? $user->img('icon_post_target_unread', 'NEW_POST') : $user->img('icon_post_target', 'POST'), - 'POST_ICON_IMG' => (!empty($row['icon_id'])) ? $icons[$row['icon_id']]['img'] : '', - 'POST_ICON_IMG_WIDTH' => (!empty($row['icon_id'])) ? $icons[$row['icon_id']]['width'] : '', - 'POST_ICON_IMG_HEIGHT' => (!empty($row['icon_id'])) ? $icons[$row['icon_id']]['height'] : '', + 'POST_ICON_IMG' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['img'] : '', + 'POST_ICON_IMG_WIDTH' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['width'] : '', + 'POST_ICON_IMG_HEIGHT' => ($topic_data['enable_icons'] && !empty($row['icon_id'])) ? $icons[$row['icon_id']]['height'] : '', 'ICQ_STATUS_IMG' => $user_cache[$poster_id]['icq_status_img'], 'ONLINE_IMG' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? '' : (($user_cache[$poster_id]['online']) ? $user->img('icon_user_online', 'ONLINE') : $user->img('icon_user_offline', 'OFFLINE')), 'S_ONLINE' => ($poster_id == ANONYMOUS || !$config['load_onlinetrack']) ? false : (($user_cache[$poster_id]['online']) ? true : false), -- cgit v1.2.1 From 97a8eb40139ddb299754a883508c9250ef544f36 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 22 Feb 2007 16:20:11 +0000 Subject: trying to fix two conversion issues - anonymous user not entered correctly or entered with user id 0 (need to be tested) - ips not converted git-svn-id: file:///svn/phpbb/trunk@7034 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 1c05af3d11..2898d56e72 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1215,6 +1215,13 @@ $template->assign_vars(array( $first_unread = $post_unread = false; for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) { + // A non-existing rowset only happens if there was no user present for the entered poster_id + // This could be a broken posts table. + if (!isset($rowset[$post_list[$i]])) + { + continue; + } + $row =& $rowset[$post_list[$i]]; $poster_id = $row['user_id']; -- cgit v1.2.1 From f6042019fa17d1256dbf9a121034b21d1bb051eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Dr=C3=B6scher?= Date: Thu, 22 Mar 2007 00:18:31 +0000 Subject: nice template variable to have git-svn-id: file:///svn/phpbb/trunk@7213 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 2898d56e72..b5686ad3c4 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -557,6 +557,7 @@ $template->assign_vars(array( 'UNAPPROVED_IMG' => $user->img('icon_topic_unapproved', 'POST_UNAPPROVED'), 'WARN_IMG' => $user->img('icon_user_warn', 'WARN_USER'), + 'S_IS_LOCKED' =>($topic_data['topic_status'] == ITEM_UNLOCKED) ? false : true, 'S_SELECT_SORT_DIR' => $s_sort_dir, 'S_SELECT_SORT_KEY' => $s_sort_key, 'S_SELECT_SORT_DAYS' => $s_limit_days, -- cgit v1.2.1 From efcb1279f06d1016c25fae516158abdb895981ee Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 30 Mar 2007 14:24:55 +0000 Subject: other fixes... git-svn-id: file:///svn/phpbb/trunk@7242 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index b5686ad3c4..8840168336 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1026,10 +1026,10 @@ while ($row = $db->sql_fetchrow($result)) 'online' => false, 'profile' => append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=viewprofile&u=$poster_id"), 'www' => $row['user_website'], - 'aim' => ($row['user_aim']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=aim&u=$poster_id") : '', - 'msn' => ($row['user_msnm']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=msnm&u=$poster_id") : '', + 'aim' => ($row['user_aim'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=aim&u=$poster_id") : '', + 'msn' => ($row['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=msnm&u=$poster_id") : '', 'yim' => ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg' : '', - 'jabber' => ($row['user_jabber']) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=jabber&u=$poster_id") : '', + 'jabber' => ($row['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&action=jabber&u=$poster_id") : '', 'search' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'search_author=' . urlencode($row['username']) .'&showresults=posts') : '', ); -- cgit v1.2.1 From 5828a9a85b07e82c88c40716f85e3561da4df690 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 1 Apr 2007 14:12:29 +0000 Subject: #5292 git-svn-id: file:///svn/phpbb/trunk@7256 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 8840168336..3e2ae7b408 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -993,7 +993,8 @@ while ($row = $db->sql_fetchrow($result)) { $user_sig = ''; - if ($row['enable_sig'] && $config['allow_sig'] && $user->optionget('viewsigs')) + // We add the signature to every posters entry because enable_sig is post dependant + if ($row['user_sig'] && $config['allow_sig'] && $user->optionget('viewsigs')) { $user_sig = $row['user_sig']; } @@ -1227,7 +1228,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) $poster_id = $row['user_id']; // End signature parsing, only if needed - if ($user_cache[$poster_id]['sig'] && empty($user_cache[$poster_id]['sig_parsed'])) + if ($user_cache[$poster_id]['sig'] && $row['enable_sig'] && empty($user_cache[$poster_id]['sig_parsed'])) { $user_cache[$poster_id]['sig'] = censor_text($user_cache[$poster_id]['sig']); $user_cache[$poster_id]['sig'] = str_replace("\n", '
', $user_cache[$poster_id]['sig']); -- cgit v1.2.1 From 3fa29da47dc52ccc3138b9bf14013545be0e90c0 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 1 Apr 2007 16:01:39 +0000 Subject: ok, these should fix the unread tracking bugs (yeah, actually two of them). Watch out for any oddities if you directly link to posts... :o git-svn-id: file:///svn/phpbb/trunk@7257 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 3e2ae7b408..ba02cfae0c 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -271,7 +271,7 @@ if ($post_id) $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - $topic_data['prev_posts'] = $row['prev_posts']; + $topic_data['prev_posts'] = $row['prev_posts'] + 1; } } @@ -1490,8 +1490,8 @@ if (isset($user->data['session_page']) && strpos($user->data['session_page'], '& } } -// Only mark topic if it's currently unread -if (isset($topic_tracking_info[$topic_id]) && $topic_data['topic_last_post_time'] > $topic_tracking_info[$topic_id]) +// Only mark topic if it's currently unread. Also make sure we do not set topic tracking back if earlier pages are viewed. +if (isset($topic_tracking_info[$topic_id]) && $topic_data['topic_last_post_time'] > $topic_tracking_info[$topic_id] && $max_post_time > $topic_tracking_info[$topic_id]) { markread('topic', $forum_id, $topic_id, $max_post_time); -- cgit v1.2.1 From e6dab93a02a05a61799c1c0e56864961e8b56bba Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 1 Apr 2007 22:15:59 +0000 Subject: - urlencoded usernames don't need htmlspecialchars [Bug #8794] - fulltext_mysql still used synonyms/ignore words [Bug #5405] - merge tool extend to allow merging complete topics via quickmod and mcp_forum [Bug #5293] - renamed "fork" to "copy" (was already called "copy" in some places) - Copied posts should not increase post count, and should also not decrease it on deletion [Bug #8072] git-svn-id: file:///svn/phpbb/trunk@7261 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index ba02cfae0c..76fb8f6d4e 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -496,7 +496,8 @@ $topic_mod .= ($auth->acl_get('m_lock', $forum_id) || ($auth->acl_get('f_user_lo $topic_mod .= ($auth->acl_get('m_delete', $forum_id)) ? '' : ''; $topic_mod .= ($auth->acl_get('m_move', $forum_id) && $topic_data['topic_status'] != ITEM_MOVED) ? '' : ''; $topic_mod .= ($auth->acl_get('m_split', $forum_id)) ? '' : ''; -$topic_mod .= ($auth->acl_get('m_merge', $forum_id)) ? '' : ''; +$topic_mod .= ($auth->acl_get('m_merge', $forum_id)) ? '' : ''; +$topic_mod .= ($auth->acl_get('m_merge', $forum_id)) ? '' : ''; $topic_mod .= ($auth->acl_get('m_move', $forum_id)) ? '' : ''; $topic_mod .= ($allow_change_type && $auth->acl_gets('f_sticky', 'f_announce', $forum_id) && $topic_data['topic_type'] != POST_NORMAL) ? '' : ''; $topic_mod .= ($allow_change_type && $auth->acl_get('f_sticky', $forum_id) && $topic_data['topic_type'] != POST_STICKY) ? '' : ''; -- cgit v1.2.1 From c8b5adf506b3011c2083594f826f43df97b0f926 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 9 Apr 2007 17:05:53 +0000 Subject: hopefully bringing back the unread link for pages being read but having unread posts on subsequent pages git-svn-id: file:///svn/phpbb/trunk@7312 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 76fb8f6d4e..8d4183b52e 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1505,11 +1505,20 @@ else } // If there are absolutely no more unread posts in this forum and unread posts shown, we can savely show the #unread link -if ($all_marked_read && $post_unread) +if ($all_marked_read) { - $template->assign_vars(array( - 'U_VIEW_UNREAD_POST' => '#unread', - )); + if ($post_unread) + { + $template->assign_vars(array( + 'U_VIEW_UNREAD_POST' => '#unread', + )); + } + else if (isset($topic_tracking_info[$topic_id]) && $topic_data['topic_last_post_time'] > $topic_tracking_info[$topic_id]) + { + $template->assign_vars(array( + 'U_VIEW_UNREAD_POST' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=unread") . '#unread', + )); + } } else if (!$all_marked_read) { -- cgit v1.2.1 From e70cea16b90ba50a6a05aa1e1b091f04805a7c1a Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Tue, 10 Apr 2007 20:50:14 +0000 Subject: checking in some fixes... also added "previous/next pm in history" links to prosilvers private message view; dhn, you may want to have a look at the placement. :) git-svn-id: file:///svn/phpbb/trunk@7322 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 8d4183b52e..214bc938e1 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -531,6 +531,12 @@ $template->assign_vars(array( 'FORUM_DESC' => generate_text_for_display($topic_data['forum_desc'], $topic_data['forum_desc_uid'], $topic_data['forum_desc_bitfield'], $topic_data['forum_desc_options']), 'TOPIC_ID' => $topic_id, 'TOPIC_TITLE' => $topic_data['topic_title'], + 'TOPIC_POSTER' => $topic_data['topic_poster'], + + 'TOPIC_AUTHOR_FULL' => get_username_string('full', $topic_data['topic_poster'], $topic_data['topic_first_poster_name'], $topic_data['topic_first_poster_colour']), + 'TOPIC_AUTHOR_COLOUR' => get_username_string('colour', $topic_data['topic_poster'], $topic_data['topic_first_poster_name'], $topic_data['topic_first_poster_colour']), + 'TOPIC_AUTHOR' => get_username_string('username', $topic_data['topic_poster'], $topic_data['topic_first_poster_name'], $topic_data['topic_first_poster_colour']), + 'PAGINATION' => $pagination, 'PAGE_NUMBER' => on_page($total_posts, $config['posts_per_page'], $start), 'TOTAL_POSTS' => ($total_posts == 1) ? $user->lang['VIEW_TOPIC_POST'] : sprintf($user->lang['VIEW_TOPIC_POSTS'], $total_posts), @@ -1425,6 +1431,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'U_WARN' => ($auth->acl_getf_global('m_warn') && $poster_id != $user->data['user_id'] && $poster_id != ANONYMOUS) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_post&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '', 'POST_ID' => $row['post_id'], + 'POSTER_ID' => $poster_id, 'S_HAS_ATTACHMENTS' => (!empty($attachments[$row['post_id']])) ? true : false, 'S_POST_UNAPPROVED' => ($row['post_approved']) ? false : true, -- cgit v1.2.1 From b63745fdb3b775d7505f38ed03a8bb39907a825c Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Thu, 12 Apr 2007 16:20:39 +0000 Subject: my take on getting the bugs down... thanks to those also providing (usable) solutions to the problem. ;) Of course also to those reporting generally... git-svn-id: file:///svn/phpbb/trunk@7330 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 214bc938e1..48ae70c7d6 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1021,7 +1021,7 @@ while ($row = $db->sql_fetchrow($result)) 'viewonline' => $row['user_allow_viewonline'], 'allow_pm' => $row['user_allow_pm'], - 'avatar' => '', + 'avatar' => ($user->optionget('viewavatars')) ? get_user_avatar($row['user_avatar'], $row['user_avatar_type'], $row['user_avatar_width'], $row['user_avatar_height']) : '', 'age' => '', 'rank_title' => '', @@ -1041,25 +1041,6 @@ while ($row = $db->sql_fetchrow($result)) 'search' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'search_author=' . urlencode($row['username']) .'&showresults=posts') : '', ); - if ($row['user_avatar'] && $user->optionget('viewavatars')) - { - $avatar_img = ''; - - switch ($row['user_avatar_type']) - { - case AVATAR_UPLOAD: - $avatar_img = $config['avatar_path'] . '/'; - break; - - case AVATAR_GALLERY: - $avatar_img = $config['avatar_gallery_path'] . '/'; - break; - } - - $avatar_img .= $row['user_avatar']; - $user_cache[$poster_id]['avatar'] = ''; - } - get_user_rank($row['user_rank'], $row['user_posts'], $user_cache[$poster_id]['rank_title'], $user_cache[$poster_id]['rank_image'], $user_cache[$poster_id]['rank_image_src']); if (!empty($row['user_allow_viewemail']) || $auth->acl_get('a_email')) -- cgit v1.2.1 From fb2454314450ad36dc5c1480749dad51d9d1c87e Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 15 Apr 2007 10:59:26 +0000 Subject: - m_warn is no longer a local moderation permission - magic urls should properly use html entities - speed up posting on big boards, MAX(post_id) query can be simplified a lot in certain cases - user IP list should be labelled with "Other users" [Bug #9707] git-svn-id: file:///svn/phpbb/trunk@7355 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 48ae70c7d6..1da4d75fbb 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1409,7 +1409,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'U_NEXT_POST_ID' => ($i < $i_total && isset($rowset[$post_list[$i + 1]])) ? $rowset[$post_list[$i + 1]]['post_id'] : '', 'U_PREV_POST_ID' => $prev_post_id, 'U_NOTES' => ($auth->acl_getf_global('m_')) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=notes&mode=user_notes&u=' . $poster_id, true, $user->session_id) : '', - 'U_WARN' => ($auth->acl_getf_global('m_warn') && $poster_id != $user->data['user_id'] && $poster_id != ANONYMOUS) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_post&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '', + 'U_WARN' => ($auth->acl_get('m_warn') && $poster_id != $user->data['user_id'] && $poster_id != ANONYMOUS) ? append_sid("{$phpbb_root_path}mcp.$phpEx", 'i=warn&mode=warn_post&f=' . $forum_id . '&p=' . $row['post_id'], true, $user->session_id) : '', 'POST_ID' => $row['post_id'], 'POSTER_ID' => $poster_id, -- cgit v1.2.1 From c76a2cdfe867952c3b1087a585589debc0b5d648 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 15 Apr 2007 21:40:25 +0000 Subject: - viewtopic/forum search boxes should also use search config option and u_search permission [Bug #9850] - mcp_reports was still using some of the mcp_queue post_id logic, changed enough to report_id logic to make it work properly now. I hope I didn't miss any external places referring to mcp_reports which send it a post_id_list. I really wonder whether people don't test the MCP at all? Good that I noticed this myself when fixing an incorrect language string (No reports selected) message [Bug #9741] - forgot to check in the changed mcp/info file for mcp_warn with global m_warn option - mcp_post.html was missing a submit button for changing the poster in prosilver [Bug #9771] - language variables in javascript in templates should use LA_ not L_ for proper escaping of single quotes git-svn-id: file:///svn/phpbb/trunk@7361 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 1da4d75fbb..fc323454ee 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -573,7 +573,7 @@ $template->assign_vars(array( 'S_TOPIC_MOD' => ($topic_mod != '') ? '' : '', 'S_MOD_ACTION' => append_sid("{$phpbb_root_path}mcp.$phpEx", "t=$topic_id&f=$forum_id&quickmod=1&redirect=" . urlencode(str_replace('&', '&', $viewtopic_url)), true, $user->session_id), - 'S_DISPLAY_SEARCHBOX' => ($auth->acl_get('f_search', $forum_id)) ? true : false, + 'S_DISPLAY_SEARCHBOX' => ($auth->acl_get('u_search') && $auth->acl_get('f_search', $forum_id) && $config['load_search']) ? true : false, 'S_SEARCHBOX_ACTION' => append_sid("{$phpbb_root_path}search.$phpEx", 't=' . $topic_id), 'U_TOPIC' => "{$server_path}viewtopic.$phpEx?f=$forum_id&t=$topic_id", -- cgit v1.2.1 From dc747b8d994b6f5d07182196ed9deed7959a7317 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 29 Apr 2007 20:56:46 +0000 Subject: - * wildcard in a search query should cause \w+ in highlighting, not \w* [Bug #10031] - display a warning that the search index is not converted from phpBB2 to phpBB3 [Bug #9761] - forgot to add : to reg_name when deleting userinfo from the url regex constructor [Bug #9868] - magic urls should work after ">" - fixed sorting in mcp_reports/mcp_queue [Bug #9882] - display a "Report has already been closed" message, if a post is accessed in mcp_reports which has a closed report (might occur if two moderators want to process it at the same time) - convertor: old forum path should have the trailing slash removed - subsilver2 will come bundled with phpBB3, but it will not be installed by default (if admins want to use it they can, but it's not a default option for users) - prosilver was missing the topic-only mode in mcp_reports/mcp_queue git-svn-id: file:///svn/phpbb/trunk@7428 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index fc323454ee..29e8282435 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -407,7 +407,7 @@ if ($hilit_words) { if (trim($word)) { - $highlight_match .= (($highlight_match != '') ? '|' : '') . str_replace('*', '\w*?', preg_quote($word, '#')); + $highlight_match .= (($highlight_match != '') ? '|' : '') . str_replace('\*', '\w+?', preg_quote($word, '#')); } } -- cgit v1.2.1 From d697124aaf7623b620588bdd918d525b1681994b Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 2 May 2007 08:24:05 +0000 Subject: Fix a bug with the prev_posts calculation and selecting the last post on a page. ;) Now also add the correct number of previous posts not including the selected one. git-svn-id: file:///svn/phpbb/trunk@7447 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 29e8282435..ca74ea3154 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -251,11 +251,11 @@ if ($post_id) if ($sort_dir == $check_sort) { - $topic_data['prev_posts'] = ($auth->acl_get('m_approve', $forum_id)) ? $topic_data['topic_replies_real'] + 1 : $topic_data['topic_replies'] + 1; + $topic_data['prev_posts'] = ($auth->acl_get('m_approve', $forum_id)) ? $topic_data['topic_replies_real'] : $topic_data['topic_replies']; } else { - $topic_data['prev_posts'] = 1; + $topic_data['prev_posts'] = 0; } } else @@ -271,7 +271,7 @@ if ($post_id) $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); - $topic_data['prev_posts'] = $row['prev_posts'] + 1; + $topic_data['prev_posts'] = $row['prev_posts'] - 1; } } @@ -341,7 +341,7 @@ if (isset($_GET['e'])) // What is start equal to? if ($post_id) { - $start = floor(($topic_data['prev_posts'] - 1) / $config['posts_per_page']) * $config['posts_per_page']; + $start = floor(($topic_data['prev_posts']) / $config['posts_per_page']) * $config['posts_per_page']; } // Get topic tracking info -- cgit v1.2.1 From 5de26540b4f0348719ec93e760ed987f92a60075 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 7 May 2007 13:19:59 +0000 Subject: fixing some bugs changed the way we are handling bookmarks. No order_id required, really! Order by last post time as suggested by BartVB. git-svn-id: file:///svn/phpbb/trunk@7497 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index ca74ea3154..6b5c2f411d 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -172,7 +172,7 @@ if ($user->data['is_registered']) if ($config['allow_bookmarks']) { - $sql_array['SELECT'] .= ', bm.order_id as bookmarked'; + $sql_array['SELECT'] .= ', bm.topic_id as bookmarked'; $sql_array['LEFT_JOIN'][] = array( 'FROM' => array(BOOKMARKS_TABLE => 'bm'), 'ON' => 'bm.user_id = ' . $user->data['user_id'] . ' AND t.topic_id = bm.topic_id' @@ -439,12 +439,8 @@ if ($config['allow_bookmarks'] && $user->data['is_registered'] && request_var('b $sql = 'INSERT INTO ' . BOOKMARKS_TABLE . ' ' . $db->sql_build_array('INSERT', array( 'user_id' => $user->data['user_id'], 'topic_id' => $topic_id, - 'order_id' => 0) - ); + )); $db->sql_query($sql); - - $where_sql = ''; - $sign = '+'; } else { @@ -452,19 +448,8 @@ if ($config['allow_bookmarks'] && $user->data['is_registered'] && request_var('b WHERE user_id = {$user->data['user_id']} AND topic_id = $topic_id"; $db->sql_query($sql); - - // Works because of current order_id selected as bookmark value (please do not change because of simplicity) - $where_sql = " AND order_id > {$topic_data['bookmarked']}"; - $sign = '-'; } - // Re-Sort Bookmarks - $sql = 'UPDATE ' . BOOKMARKS_TABLE . " - SET order_id = order_id $sign 1 - WHERE user_id = {$user->data['user_id']} - $where_sql"; - $db->sql_query($sql); - meta_refresh(3, $viewtopic_url); $message = (($topic_data['bookmarked']) ? $user->lang['BOOKMARK_REMOVED'] : $user->lang['BOOKMARK_ADDED']) . '

' . sprintf($user->lang['RETURN_TOPIC'], '', ''); -- cgit v1.2.1 From 4b876ffee5b714bcd7fbf8eb2df022f32251a9ff Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 13 May 2007 16:15:20 +0000 Subject: - correctly transfer the search query across search result pages - changed highlighting so foo* will match foo again [Bug #10031] - restructured magic urls (functionality still mostly the same), added a check for entities in urls and punctuation at the end of magic urls [Bugs #10639, #10293] - undid the workaround for urls in quotes, as it's fixed by the new magic url handling - allow magic urls enclosed in BBCode [Bug #10319] - added handling for IPv6 addresses to the IP checking without adding extra options [Bug #9538] - correctly handle search in search results of search queries with brackets [Bug #10581] - added information about requirements for auth_apache [Bug #10107] git-svn-id: file:///svn/phpbb/trunk@7559 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 6b5c2f411d..04505d07f0 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -407,7 +407,9 @@ if ($hilit_words) { if (trim($word)) { - $highlight_match .= (($highlight_match != '') ? '|' : '') . str_replace('\*', '\w+?', preg_quote($word, '#')); + $word = str_replace('\*', '\w+?', preg_quote($word, '#')); + $word = preg_replace('#(^|\s)\\\\w\*\?(\s|$)#', '$1\w+?$2', $word); + $highlight_match .= (($highlight_match != '') ? '|' : '') . $word; } } -- cgit v1.2.1 From 4c44eddc907f1e17a6880fdba918d6523c2f660f Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 19 May 2007 16:40:56 +0000 Subject: we included a check for getimagesize() existance... now we again can suppress notices while running this function. git-svn-id: file:///svn/phpbb/trunk@7646 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/viewtopic.php | 1 + 1 file changed, 1 insertion(+) (limited to 'phpBB/viewtopic.php') diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 04505d07f0..98d852737e 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1409,6 +1409,7 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) 'S_UNREAD_POST' => $post_unread, 'S_FIRST_UNREAD' => $s_first_unread, 'S_CUSTOM_FIELDS' => (isset($cp_row['row']) && sizeof($cp_row['row'])) ? true : false, + 'S_TOPIC_POSTER' => ($topic_data['topic_poster'] == $poster_id) ? true : false, 'S_IGNORE_POST' => ($row['hide_post']) ? true : false, 'L_IGNORE_POST' => ($row['hide_post']) ? sprintf($user->lang['POST_BY_FOE'], get_username_string('full', $poster_id, $row['username'], $row['user_colour'], $row['post_username']), '', '') : '', -- cgit v1.2.1