Update src/Model/Post/Counts.php

Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
Michael Vogel 2024-01-25 22:16:38 +01:00 committed by GitHub
parent dcb6fa32a1
commit e1381cfc5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,7 +78,7 @@ class Counts
{ {
self::update($uri_id, $parent_uri_id, Verb::getID(Activity::POST), Activity::POST); self::update($uri_id, $parent_uri_id, Verb::getID(Activity::POST), Activity::POST);
$activities = DBA::p("SELECT `parent-uri-id`, `vid`, `verb`, `body` FROM `post-view` WHERE `thr-parent-id` = ? AND `gravity` = ? AND NOT `vid` IS NULL GROUP BY `parent-uri-id`, `vid`, `verb`, `body`", $uri_id, Item::GRAVITY_ACTIVITY); $activities = DBA::p("SELECT `parent-uri-id`, `vid`, `verb`, `body` FROM `post-view` WHERE `thr-parent-id` = ? AND `gravity` = ? AND `vid` IS NOT NULL GROUP BY `parent-uri-id`, `vid`, `verb`, `body`", $uri_id, Item::GRAVITY_ACTIVITY);
while ($activity = DBA::fetch($activities)) { while ($activity = DBA::fetch($activities)) {
self::update($uri_id, $activity['parent-uri-id'], $activity['vid'], $activity['verb'], $activity['body']); self::update($uri_id, $activity['parent-uri-id'], $activity['vid'], $activity['verb'], $activity['body']);
} }