diff -r a932ce8c4827 -r 98d80b672f3c punbb/viewtopic.php --- a/punbb/viewtopic.php Sun Jun 15 01:42:31 2008 -0400 +++ b/punbb/viewtopic.php Sat Apr 11 16:47:10 2009 -0400 @@ -276,25 +276,32 @@ // Retrieve the posts (and their respective poster/online status) $query = array( - 'SELECT' => 'u.email, u.title, u.url, u.location, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online', - 'FROM' => 'posts AS p', + 'SELECT' => 'u.email, u.title, u.url, u.location, eu.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online', + 'FROM' => table_prefix . 'pun_posts AS p', 'JOINS' => array( array( - 'INNER JOIN' => 'users AS u', + 'INNER JOIN' => table_prefix . 'pun_users AS u', 'ON' => 'u.id=p.poster_id' ), + array( + 'INNER JOIN' => table_prefix . 'users AS eu', + 'ON' => 'u.id=eu.user_id' + ), array( - 'INNER JOIN' => 'groups AS g', + 'INNER JOIN' => table_prefix . 'pun_groups AS g', 'ON' => 'g.g_id=u.group_id' ), array( - 'LEFT JOIN' => 'online AS o', + 'LEFT JOIN' => table_prefix . 'pun_online AS o', 'ON' => '(o.user_id=u.id AND o.user_id!=1 AND o.idle=0)' ), ), 'WHERE' => 'p.topic_id='.$id, 'ORDER BY' => 'p.id', - 'LIMIT' => $pun_page['start_from'].','.$pun_user['disp_posts'] + 'LIMIT' => $pun_page['start_from'].','.$pun_user['disp_posts'], + 'PARAMS' => array( + 'NO_PREFIX' => true + ) ); ($hook = get_hook('vt_qr_get_posts')) ? eval($hook) : null;