aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorChris Smith <toonarmy@phpbb.com>2008-09-06 12:58:29 +0000
committerChris Smith <toonarmy@phpbb.com>2008-09-06 12:58:29 +0000
commit674777246a2874bad99721189b84e1d875e46c53 (patch)
treef8919a5e8cb29616907ae55e4fe8de19e5806132 /phpBB/viewtopic.php
parenta5761193c28177fef5657963188655ade7f9591a (diff)
downloadforums-674777246a2874bad99721189b84e1d875e46c53.tar
forums-674777246a2874bad99721189b84e1d875e46c53.tar.gz
forums-674777246a2874bad99721189b84e1d875e46c53.tar.bz2
forums-674777246a2874bad99721189b84e1d875e46c53.tar.xz
forums-674777246a2874bad99721189b84e1d875e46c53.zip
Stop search bots incrementing topic views. #32675
Use correct link for post author search. #32595 Insert missing space. #32315 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8835 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index 652b30e99b..8db6ed1ebd 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -1083,7 +1083,7 @@ while ($row = $db->sql_fetchrow($result))
'msn' => ($row['user_msnm'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&amp;action=msnm&amp;u=$poster_id") : '',
'yim' => ($row['user_yim']) ? 'http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row['user_yim']) . '&amp;.src=pg' : '',
'jabber' => ($row['user_jabber'] && $auth->acl_get('u_sendim')) ? append_sid("{$phpbb_root_path}memberlist.$phpEx", "mode=contact&amp;action=jabber&amp;u=$poster_id") : '',
- 'search' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", 'search_author=' . urlencode($row['username']) .'&amp;sr=posts') : '',
+ 'search' => ($auth->acl_get('u_search')) ? append_sid("{$phpbb_root_path}search.$phpEx", "author_id=$poster_id&amp;sr=posts") : '',
);
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']);
@@ -1505,8 +1505,8 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i)
}
unset($rowset, $user_cache);
-// Update topic view and if necessary attachment view counters ... but only if this is the first 'page view'
-if (isset($user->data['session_page']) && strpos($user->data['session_page'], '&t=' . $topic_id) === false)
+// Update topic view and if necessary attachment view counters ... but only for humans and if this is the first 'page view'
+if (isset($user->data['session_page']) && !$user->data['is_bot'] && strpos($user->data['session_page'], '&t=' . $topic_id) === false)
{
$sql = 'UPDATE ' . TOPICS_TABLE . '
SET topic_views = topic_views + 1, topic_last_view_time = ' . time() . "
@@ -1580,7 +1580,7 @@ if (empty($_REQUEST['f']))
}
// Output the page
-page_header($user->lang['VIEW_TOPIC'] .' - ' . $topic_data['topic_title']);
+page_header($user->lang['VIEW_TOPIC'] . ' - ' . $topic_data['topic_title']);
$template->set_filenames(array(
'body' => ($view == 'print') ? 'viewtopic_print.html' : 'viewtopic_body.html')