Skip to content

Commit 70dac44

Browse files
authored
Merge pull request #297 from Leinad4Mind/fix-comments
Fix comment search
2 parents 7edf3e8 + 3f4e0ce commit 70dac44

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

core/search.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ public function recent_comments($limit, $start = 0)
299299
$this->comments_table => 'c',
300300
),
301301
'WHERE' => 'i.image_id = c.comment_image_id and ' . $this->db->sql_in_set('image_album_id', $this->gallery_auth->acl_album_ids('c_read'), false, true),
302-
'GROUP_BY' => 'c.comment_id, i.image_id',
303302
'ORDER_BY' => 'comment_time DESC'
304303
);
305304
$sql_array['WHERE'] .= ' AND ((' . $this->db->sql_in_set('image_album_id', array_diff($this->gallery_auth->acl_album_ids('i_view'), $exclude_albums), false, true) . ' AND image_status <> ' . \phpbbgallery\core\block::STATUS_UNAPPROVED . ')
@@ -363,8 +362,8 @@ public function recent_comments($limit, $start = 0)
363362
));
364363
$this->pagination->generate_template_pagination(array(
365364
'routes' => array(
366-
'phpbbgallery_core_search_recent',
367-
'phpbbgallery_core_search_recent_page',),
365+
'phpbbgallery_core_search_commented',
366+
'phpbbgallery_core_search_commented_page',),
368367
'params' => array()), 'pagination', 'page', $count, $limit, $start
369368
);
370369
}

0 commit comments

Comments
 (0)