Merge pull request #11048 from MrPetovan/bug/10990-prepare_photo_data

Add expected field uri-id to Post query in prepare_photo_data()
This commit is contained in:
Michael Vogel 2021-11-30 06:09:14 +01:00 committed by GitHub
commit ca851f8a03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -519,7 +519,7 @@ function prepare_photo_data($type, $scale, $photo_id, $uid)
// retrieve item element for getting activities (like, dislike etc.) related to photo
$condition = ['uid' => $uid, 'resource-id' => $photo_id];
$item = Post::selectFirst(['id', 'uid', 'uri', 'parent', 'allow_cid', 'deny_cid', 'allow_gid', 'deny_gid'], $condition);
$item = Post::selectFirst(['id', 'uid', 'uri', 'uri-id', 'parent', 'allow_cid', 'deny_cid', 'allow_gid', 'deny_gid'], $condition);
if (!DBA::isResult($item)) {
throw new NotFoundException('Photo-related item not found.');
}