Issue 9980: "type" does not exist anymore
This commit is contained in:
parent
9c9317010b
commit
5577d0641d
1 changed files with 2 additions and 2 deletions
|
@ -4872,7 +4872,7 @@ function prepare_photo_data($type, $scale, $photo_id)
|
||||||
}
|
}
|
||||||
|
|
||||||
// retrieve item element for getting activities (like, dislike etc.) related to photo
|
// retrieve item element for getting activities (like, dislike etc.) related to photo
|
||||||
$condition = ['uid' => api_user(), 'resource-id' => $photo_id, 'type' => 'photo'];
|
$condition = ['uid' => api_user(), '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', 'parent', 'allow_cid', 'deny_cid', 'allow_gid', 'deny_gid'], $condition);
|
||||||
if (!DBA::isResult($item)) {
|
if (!DBA::isResult($item)) {
|
||||||
throw new NotFoundException('Photo-related item not found.');
|
throw new NotFoundException('Photo-related item not found.');
|
||||||
|
@ -4881,7 +4881,7 @@ function prepare_photo_data($type, $scale, $photo_id)
|
||||||
$data['photo']['friendica_activities'] = api_format_items_activities($item, $type);
|
$data['photo']['friendica_activities'] = api_format_items_activities($item, $type);
|
||||||
|
|
||||||
// retrieve comments on photo
|
// retrieve comments on photo
|
||||||
$condition = ["`parent` = ? AND `uid` = ? AND (`gravity` IN (?, ?) OR `type`='photo')",
|
$condition = ["`parent` = ? AND `uid` = ? AND `gravity` IN (?, ?)",
|
||||||
$item['parent'], api_user(), GRAVITY_PARENT, GRAVITY_COMMENT];
|
$item['parent'], api_user(), GRAVITY_PARENT, GRAVITY_COMMENT];
|
||||||
|
|
||||||
$statuses = Post::selectForUser(api_user(), [], $condition);
|
$statuses = Post::selectForUser(api_user(), [], $condition);
|
||||||
|
|
Loading…
Reference in a new issue