diff options
author | Tom Beddard <subblue@users.sourceforge.net> | 2006-02-07 17:51:42 +0000 |
---|---|---|
committer | Tom Beddard <subblue@users.sourceforge.net> | 2006-02-07 17:51:42 +0000 |
commit | 4a595d458bf896135039fef382cbfb4b1a4e2555 (patch) | |
tree | c449af873402a661e22c664a249490ac9b203648 /phpBB/viewtopic.php | |
parent | 0942c1563c0a381a25855eea4b5c3b4307ea1d8a (diff) | |
download | forums-4a595d458bf896135039fef382cbfb4b1a4e2555.tar forums-4a595d458bf896135039fef382cbfb4b1a4e2555.tar.gz forums-4a595d458bf896135039fef382cbfb4b1a4e2555.tar.bz2 forums-4a595d458bf896135039fef382cbfb4b1a4e2555.tar.xz forums-4a595d458bf896135039fef382cbfb4b1a4e2555.zip |
Fixed an an undefined index issue when a topic was bumped by someone who hadn't posted in the topic (like an admin). Still not ideal as it won't state who bumped the topic in this case.
git-svn-id: file:///svn/phpbb/trunk@5534 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r-- | phpBB/viewtopic.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 454dca6d27..cb2a6cc6ff 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -1225,10 +1225,11 @@ for ($i = 0, $end = sizeof($post_list); $i < $end; ++$i) } // Bump information - if ($topic_data['topic_bumped'] && $row['post_id'] == $topic_data['topic_last_post_id']) + 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 + // 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) $l_bumped_by = '<br /><br />' . sprintf($user->lang['BUMPED_BY'], $user_cache[$topic_data['topic_bumper']]['username'], $user->format_date($topic_data['topic_last_post_time'])); } else |