includes/comment.php
changeset 320 112debff64bd
parent 263 d57af0b0302e
child 322 5f1cd51bf1be
equal deleted inserted replaced
319:8be996c3740d 320:112debff64bd
   111                                  ON (u.user_id=c.user_id)
   111                                  ON (u.user_id=c.user_id)
   112                                LEFT JOIN '.table_prefix.'buddies AS b
   112                                LEFT JOIN '.table_prefix.'buddies AS b
   113                                  ON ( ( b.user_id=' . $session->user_id.' AND b.buddy_user_id=c.user_id ) OR b.user_id IS NULL)
   113                                  ON ( ( b.user_id=' . $session->user_id.' AND b.buddy_user_id=c.user_id ) OR b.user_id IS NULL)
   114                                WHERE page_id=\'' . $this->page_id . '\'
   114                                WHERE page_id=\'' . $this->page_id . '\'
   115                                  AND namespace=\'' . $this->namespace . '\'
   115                                  AND namespace=\'' . $this->namespace . '\'
   116                                GROUP BY c.comment_id
   116                                GROUP BY c.comment_id,c.name,c.subject,c.comment_data,c.time,c.approved,u.user_level,u.user_id,u.signature,b.buddy_id,b.is_friend
   117                                ORDER BY c.time ASC;');
   117                                ORDER BY c.time ASC;');
   118         $count_appr = 0;
   118         $count_appr = 0;
   119         $count_total = 0;
   119         $count_total = 0;
   120         $count_unappr = 0;
   120         $count_unappr = 0;
   121         $ret['comments'] = Array();
   121         $ret['comments'] = Array();