|
From: Jon O. <jon...@us...> - 2007-04-28 19:58:29
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/includes
In directory sc8-pr-cvs16:/tmp/cvs-serv25229/includes
Modified Files:
functions.php functions_linkdb.php
Log Message:
fixes
Index: functions.php
===================================================================
RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** functions.php 13 Aug 2006 19:43:51 -0000 1.15
--- functions.php 28 Apr 2007 19:58:25 -0000 1.16
***************
*** 582,585 ****
--- 582,586 ----
default:
+ /* Bug 50
$sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_link) AS total_votes, u.user_id, u.username
FROM " . LINKS_TABLE . " AS f, " . LINK_CATEGORIES_TABLE . " AS cat
***************
*** 589,592 ****
--- 590,601 ----
AND f.link_id = '" . $item_id . "'
GROUP BY f.link_id ";
+ */
+ $sql = "SELECT f.*, AVG(r.rate_point) AS rating, COUNT(r.votes_link) AS total_votes, u.user_id, u.username
+ FROM " . LINKS_TABLE . " AS f
+ LEFT JOIN " . LINK_CATEGORIES_TABLE . " AS cat ON cat.cat_id = f.link_catid
+ LEFT JOIN " . LINK_VOTES_TABLE . " AS r ON f.link_id = r.votes_link
+ LEFT JOIN " . USERS_TABLE . " AS u ON f.user_id = u.user_id
+ WHERE f.link_id = '" . $item_id . "'
+ GROUP BY f.link_id ";
break;
}
Index: functions_linkdb.php
===================================================================
RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_linkdb.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** functions_linkdb.php 16 Aug 2006 20:29:01 -0000 1.22
--- functions_linkdb.php 28 Apr 2007 19:58:25 -0000 1.23
***************
*** 144,148 ****
$this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id'] = $cat_rowset[$i]['comments_forum_id'] < 1 ? ( intval($linkdb_config['comments_forum_id']) ) : ( intval($cat_rowset[$i]['comments_forum_id']) ); // phpBB target forum (only used for phpBB comments)
! if (!$this->comments[$cat_rowset[$i]['cat_id']]['internal_comments'] && intval($this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id']) < 1)
{
mx_message_die(GENERAL_ERROR, 'Init Failure, phpBB comments with no target forum_id :(<br> Category: ' . $cat_rowset[$i]['cat_name'] . ' Forum_id: ' . $this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id']);
--- 144,148 ----
$this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id'] = $cat_rowset[$i]['comments_forum_id'] < 1 ? ( intval($linkdb_config['comments_forum_id']) ) : ( intval($cat_rowset[$i]['comments_forum_id']) ); // phpBB target forum (only used for phpBB comments)
! if ($this->comments[$cat_rowset[$i]['cat_id']]['activated'] && !$this->comments[$cat_rowset[$i]['cat_id']]['internal_comments'] && intval($this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id']) < 1)
{
mx_message_die(GENERAL_ERROR, 'Init Failure, phpBB comments with no target forum_id :(<br> Category: ' . $cat_rowset[$i]['cat_name'] . ' Forum_id: ' . $this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id']);
|