From 370827654caff59676b600647f7d7d6dce6c3ccc Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 29 Nov 2021 23:51:04 -0500 Subject: [PATCH] Add expected field uri-id to Post query in prepare_photo_data() --- include/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/api.php b/include/api.php index 4f7040ab4b..a35da5c524 100644 --- a/include/api.php +++ b/include/api.php @@ -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.'); }