$a->profile_uid = $user['uid'];
$is_owner = (local_user() && (local_user() == $a->profile_uid));
- $profile = Profile::getByNickname($nick, $a->profile_uid);
+ $profile = Profile::getByNickname($nick);
$account_type = Contact::getAccountType($profile);
$arr['guid'] = System::createUUID();
$arr['uid'] = $page_owner_uid;
$arr['uri'] = $uri;
- $arr['type'] = 'photo';
+ $arr['post-type'] = Item::PT_IMAGE;
$arr['wall'] = 1;
$arr['resource-id'] = $resource_id;
$arr['contact-id'] = $owner_record['id'];
}
if (!empty($link_item['parent']) && !empty($link_item['uid'])) {
- $condition = ["`parent` = ? AND `gravity` != ?", $link_item['parent'], GRAVITY_PARENT];
+ $condition = ["`parent` = ? AND `gravity` = ?", $link_item['parent'], GRAVITY_COMMENT];
$total = Post::count($condition);
$pager = new Pager(DI::l10n(), DI::args()->getQueryString());