]> git.mxchange.org Git - friendica.git/blobdiff - mod/photos.php
Set CORS header fields to support Halcyon
[friendica.git] / mod / photos.php
index e720d7d4b33c847b7c828581642cc78093cb5bca..b0bd79b8f52afd17dfdf9034363d27f31c028821 100644 (file)
@@ -73,7 +73,7 @@ function photos_init(App $a) {
                $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);
 
@@ -784,7 +784,7 @@ function photos_post(App $a)
        $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'];
@@ -1275,7 +1275,7 @@ function photos_content(App $a)
                }
 
                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());