diff --git a/mod/photos.php b/mod/photos.php index df8438464..d23c454c0 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -1275,7 +1275,7 @@ function photos_content(App $a) } if (!empty($link_item['parent']) && !empty($link_item['uid'])) { - $condition = ["`parent` = ? AND `gravity` != ?", $link_item['parent'], GRAVITY_PARENT]; + $condition = ["`parent` = ? AND `gravity` = ?", $link_item['parent'], GRAVITY_COMMENT]; $total = Post::count($condition); $pager = new Pager(DI::l10n(), DI::args()->getQueryString());