|
From: FlorinCB <ory...@us...> - 2008-09-16 20:40:38
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv2307 Modified Files: mx_functions_tools.php Log Message: fix for phpBB3 backend Index: mx_functions_tools.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_tools.php,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** mx_functions_tools.php 15 Sep 2008 23:49:47 -0000 1.41 --- mx_functions_tools.php 17 Sep 2008 03:40:30 -0000 1.42 *************** *** 4284,4303 **** $this->total_comments = ( $row = $db->sql_fetchrow($result) ) ? intval($row['number']) : 0; // // Go ahead and pull all data for this topic ! // ! $sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid ! FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt ! WHERE p.topic_id = '" . $this->topic_id . "' ! AND pt.post_id = p.post_id ! AND u.user_id = p.poster_id ! ORDER BY p.post_id DESC"; ! if ( $this->start > -1 && $this->pagination_num > 0 ) { ! $sql .= " LIMIT $this->start, $this->pagination_num "; } ! if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Could not obtain post/user information.", '', __LINE__, __FILE__, $sql ); --- 4284,4327 ---- $this->total_comments = ( $row = $db->sql_fetchrow($result) ) ? intval($row['number']) : 0; + // // Go ahead and pull all data for this topic ! // ! switch (PORTAL_BACKEND) ! { ! case 'internal': ! case 'phpbb2': ! ! $sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid ! FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TEXT_TABLE . " pt ! WHERE p.topic_id = '" . $this->topic_id . "' ! AND pt.post_id = p.post_id ! AND u.user_id = p.poster_id ! ORDER BY p.post_id DESC"; ! break; ! ! case 'phpbb3': ! ! $sql = "SELECT u.*, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid ! FROM " . POSTS_TABLE . " p, " . USERS_TABLE . " u, " . POSTS_TABLE . " pt ! WHERE p.topic_id = '" . $this->topic_id . "' ! AND pt.post_id = p.post_id ! AND u.user_id = p.poster_id ! ORDER BY p.post_id DESC"; ! break; ! } ! ! ! if ($this->start > -1 && $this->pagination_num > 0) { ! $result = $db->sql_query_limit($sql, $this->start, $this->pagination_num); } + else + { + $result = $db->sql_query_limit($sql, $this->start, $this->pagination_num); + } ! if (!$result) { mx_message_die( GENERAL_ERROR, "Could not obtain post/user information.", '', __LINE__, __FILE__, $sql ); |