aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewtopic.php
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2003-05-28 14:20:11 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2003-05-28 14:20:11 +0000
commit65b38b317ffaf7e32178377d6cc64a22e7c46a1c (patch)
tree558da0eb9414d4dcfd6850f88b3117f2714686e4 /phpBB/viewtopic.php
parent208f1e59bf2b9d9ab2ea0ecc7dcac9c09031c3fb (diff)
downloadforums-65b38b317ffaf7e32178377d6cc64a22e7c46a1c.tar
forums-65b38b317ffaf7e32178377d6cc64a22e7c46a1c.tar.gz
forums-65b38b317ffaf7e32178377d6cc64a22e7c46a1c.tar.bz2
forums-65b38b317ffaf7e32178377d6cc64a22e7c46a1c.tar.xz
forums-65b38b317ffaf7e32178377d6cc64a22e7c46a1c.zip
Incorrect avatar dimensions
git-svn-id: file:///svn/phpbb/trunk@4065 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/viewtopic.php')
-rw-r--r--phpBB/viewtopic.php24
1 files changed, 9 insertions, 15 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php
index a767416e5d..6b5d77dd4a 100644
--- a/phpBB/viewtopic.php
+++ b/phpBB/viewtopic.php
@@ -384,14 +384,6 @@ $pagination_url = "viewtopic.$phpEx$SID&amp;f=$forum_id&amp;t=$topic_id&amp;" .
$pagination = generate_pagination($pagination_url, $total_posts, $config['posts_per_page'], $start);
-// Post, reply and other URL generation for templating vars
-$new_topic_url = 'posting.' . $phpEx . $SID . '&amp;mode=post&amp;f=' . $forum_id;
-$reply_topic_url = 'posting.' . $phpEx . $SID . '&amp;mode=reply&amp;f=' . $forum_id . '&amp;t=' . $topic_id;
-$view_forum_url = 'viewforum.' . $phpEx . $SID . '&amp;f=' . $forum_id;
-$view_prev_topic_url = 'viewtopic.' . $phpEx . $SID . '&amp;f=' . $forum_id . '&amp;t=' . $topic_id . '&amp;view=previous';
-$view_next_topic_url = 'viewtopic.' . $phpEx . $SID . '&amp;f=' . $forum_id . '&amp;t=' . $topic_id . '&amp;view=next';
-
-
// Grab censored words
$censors = array();
obtain_word_list($censors);
@@ -463,16 +455,17 @@ $template->assign_vars(array(
'U_FORUM' => $server_path,
'U_VIEW_UNREAD_POST' => "viewtopic.$phpEx$SID&amp;f=$forum_id&amp;t=$topic_id&amp;view=unread#unread",
'U_VIEW_TOPIC' => "viewtopic.$phpEx$SID&amp;f=$forum_id&amp;t=$topic_id&amp;start=$start&amp;$u_sort_param&amp;hilit=$highlight",
- 'U_VIEW_FORUM' => $view_forum_url,
- 'U_VIEW_OLDER_TOPIC' => $view_prev_topic_url,
- 'U_VIEW_NEWER_TOPIC' => $view_next_topic_url,
+ 'U_VIEW_FORUM' => "viewforum.$phpEx$SID&amp;f=$forum_id",
+ 'U_VIEW_OLDER_TOPIC' => "viewtopic.$phpEx$SID&amp;f=$forum_id&amp;t=$topic_id&amp;view=previous",
+ 'U_VIEW_NEWER_TOPIC' => "viewtopic.$phpEx$SID&amp;f=$forum_id&amp;t=$topic_id&amp;view=next",
'U_PRINT_TOPIC' => "viewtopic.$phpEx$SID&amp;f=$forum_id&amp;t=$topic_id&amp;$u_sort_param&amp;view=print",
'U_EMAIL_TOPIC' => "memberlist.$phpEx$SID&amp;mode=email&amp;t=$topic_id",
- 'U_POST_NEW_TOPIC' => $new_topic_url,
- 'U_POST_REPLY_TOPIC' => $reply_topic_url)
+ 'U_POST_NEW_TOPIC' => "posting.$phpE$SID&amp;mode=post&amp;f=$forum_id",
+ 'U_POST_REPLY_TOPIC' => "posting.$phpEx$SID&amp;mode=reply&amp;f=$forum_id&amp;t=$topic_id")
);
+
// Does this topic contain a poll?
if (!empty($poll_start))
{
@@ -631,7 +624,7 @@ $sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_karma, u
$limit_posts_time
AND u.user_id = p.poster_id
ORDER BY $sort_order";
-$result = (isset($_GET['view']) && $_GET['view'] == 'print') ? $db->sql_query($sql) : $db->sql_query_limit($sql, intval($config['posts_per_page']), $start);
+$result = (isset($_GET['view']) && $_GET['view'] == 'print') ? $db->sql_query($sql) : $db->sql_query_limit($sql, $config['posts_per_page'], $start);
if (!$row = $db->sql_fetchrow($result))
{
@@ -760,6 +753,7 @@ do
if ($row['user_avatar'] && $user->data['user_viewavatars'])
{
+ $avatar_img = '';
switch ($row['user_avatar_type'])
{
case AVATAR_UPLOAD:
@@ -771,7 +765,7 @@ do
}
$avatar_img .= $row['user_avatar'];
- $user_cache[$poster_id]['avatar'] = '<img src="' . $avatar_img . '" width="' . $user->data['user_avatar_width'] . '" height="' . $user->data['user_avatar_height'] . '" border="0" alt="" />';
+ $user_cache[$poster_id]['avatar'] = '<img src="' . $avatar_img . '" width="' . $row['user_avatar_width'] . '" height="' . $row['user_avatar_height'] . '" border="0" alt="" />';
}
if (!empty($row['user_rank']))