]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #3033 from annando/1612-object-type
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Tue, 20 Dec 2016 14:44:07 +0000 (15:44 +0100)
committerGitHub <noreply@github.com>
Tue, 20 Dec 2016 14:44:07 +0000 (15:44 +0100)
The object type "photo" is deprecated and was replaced by "image"

include/diaspora.php
include/like.php
mod/photos.php
mod/subthread.php
mod/tagger.php

index 94c6ccfb8d201dfa55b7e1e766ca72dece17af88..3b4832e74f579bcdd35b4cba9f2ba1f4e22fec8a 100644 (file)
@@ -2290,7 +2290,7 @@ class diaspora {
                                $body = "[img]".unxmlify($photo->remote_photo_path).
                                        unxmlify($photo->remote_photo_name)."[/img]\n".$body;
 
-                       $datarray["object-type"] = ACTIVITY_OBJ_PHOTO;
+                       $datarray["object-type"] = ACTIVITY_OBJ_IMAGE;
                } else {
                        $datarray["object-type"] = ACTIVITY_OBJ_NOTE;
 
index 5b6d1b9e6e7fbf642b768396fee1fe305dea4232..e997e05d6b0e43601d6924dd1bf23ebec532915c 100644 (file)
@@ -163,7 +163,7 @@ function do_like($item_id, $verb) {
        $post_type = (($item['resource-id']) ? t('photo') : t('status'));
        if($item['object-type'] === ACTIVITY_OBJ_EVENT)
                $post_type = t('event');
-       $objtype = (($item['resource-id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE );
+       $objtype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE );
        $link = xmlify('<link rel="alternate" type="text/html" href="' . $a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
        $body = $item['body'];
 
index 24cc8fabbb28b7d25607870d4fd25f9e21da3ea9..1ef43f423ab3f6105eb63094a114b9af8a8977b8 100644 (file)
@@ -681,7 +681,7 @@ function photos_post(&$a) {
                                        $arr['visible']       = 1;
                                        $arr['verb']          = ACTIVITY_TAG;
                                        $arr['object-type']   = ACTIVITY_OBJ_PERSON;
-                                       $arr['target-type']   = ACTIVITY_OBJ_PHOTO;
+                                       $arr['target-type']   = ACTIVITY_OBJ_IMAGE;
                                        $arr['tag']           = $tagged[4];
                                        $arr['inform']        = $tagged[2];
                                        $arr['origin']        = 1;
@@ -694,7 +694,7 @@ function photos_post(&$a) {
                                                $arr['object'] .= xmlify('<link rel="photo" type="'.$p[0]['type'].'" href="' . $tagged[3]['photo'] . '" />' . "\n");
                                        $arr['object'] .= '</link></object>' . "\n";
 
-                                       $arr['target'] = '<target><type>' . ACTIVITY_OBJ_PHOTO . '</type><title>' . $p[0]['desc'] . '</title><id>'
+                                       $arr['target'] = '<target><type>' . ACTIVITY_OBJ_IMAGE . '</type><title>' . $p[0]['desc'] . '</title><id>'
                                                . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . '</id>';
                                        $arr['target'] .= '<link>' . xmlify('<link rel="alternate" type="text/html" href="' . $a->get_baseurl() . '/photos/' . $owner_record['nickname'] . '/image/' . $p[0]['resource-id'] . '" />' . "\n" . '<link rel="preview" type="'.$p[0]['type'].'" href="' . $a->get_baseurl() . "/photo/" . $p[0]['resource-id'] . '-' . $best . '.' . $ext . '" />') . '</link></target>';
 
index dc014047a0bdf151fc18b1971b7f646734849d91..b15b954742af5a7dc6c749e02988434b218ae53c 100644 (file)
@@ -85,7 +85,7 @@ function subthread_content(&$a) {
        $uri = item_new_uri($a->get_hostname(),$owner_uid);
 
        $post_type = (($item['resource-id']) ? t('photo') : t('status'));
-       $objtype = (($item['resource-id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE );
+       $objtype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE );
        $link = xmlify('<link rel="alternate" type="text/html" href="' . $a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;
        $body = $item['body'];
 
index e5e5263d81947569a75a9056d906b323c4c962b3..d6f421205cbfff1cb9e30eefae1bd16ebbb7ce30 100644 (file)
@@ -60,7 +60,7 @@ function tagger_content(&$a) {
        $uri = item_new_uri($a->get_hostname(),$owner_uid);
        $xterm = xmlify($term);
        $post_type = (($item['resource-id']) ? t('photo') : t('status'));
-       $targettype = (($item['resource-id']) ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE );
+       $targettype = (($item['resource-id']) ? ACTIVITY_OBJ_IMAGE : ACTIVITY_OBJ_NOTE );
 
        $link = xmlify('<link rel="alternate" type="text/html" href="'
                . $a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id'] . '" />' . "\n") ;