Merge pull request #10001 from annando/issue-9925

issue 9925: Fixes database error with MySQL 8
This commit is contained in:
Hypolite Petovan 2021-03-07 04:35:10 -05:00 committed by GitHub
commit ab9090ede1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -81,11 +81,11 @@ class Profile extends BaseModule
} }
$items_stmt = DBA::p( $items_stmt = DBA::p(
"SELECT DISTINCT(`parent-uri-id`) AS `uri-id`, MAX(`created`), MAX(`received`) FROM `post-user-view` "SELECT `parent-uri-id` AS `uri-id`, MAX(`created`), MAX(`received`) FROM `post-user-view`
WHERE `uid` = ? AND NOT `contact-blocked` AND NOT `contact-pending` WHERE `uid` = ? AND NOT `contact-blocked` AND NOT `contact-pending`
AND `visible` AND (NOT `deleted` OR `gravity` = ?) AND `visible` AND (NOT `deleted` OR `gravity` = ?)
AND `wall` $sql_extra4 $sql_extra AND `wall` $sql_extra4 $sql_extra
ORDER BY `received` DESC", GROUP BY `parent-uri-id` ORDER BY `received` DESC",
$a->profile['uid'], $a->profile['uid'],
GRAVITY_ACTIVITY GRAVITY_ACTIVITY
); );