]> git.mxchange.org Git - friendica.git/blobdiff - mod/photos.php
New item field "Post-type" and new table "permissionset" (#5408)
[friendica.git] / mod / photos.php
index d969fd32719c357eca92652b4d8e19a00523fa8b..bd1de938c89b6c38eaedd0b8db0668ea16c02925 100644 (file)
@@ -101,6 +101,8 @@ function photos_init(App $a) {
 
                if (local_user() && $a->data['user']['uid'] == local_user()) {
                        $can_post = true;
+               } else {
+                       $can_post = false;
                }
 
                if ($ret['success']) {
@@ -457,7 +459,7 @@ function photos_post(App $a)
                        $arr['uid']           = $page_owner_uid;
                        $arr['uri']           = $uri;
                        $arr['parent-uri']    = $uri;
-                       $arr['type']          = 'photo';
+                       $arr['post-type']     = Item::PT_IMAGE;
                        $arr['wall']          = 1;
                        $arr['resource-id']   = $p[0]['resource-id'];
                        $arr['contact-id']    = $owner_record['id'];
@@ -624,7 +626,6 @@ function photos_post(App $a)
                                        $arr['uid']           = $page_owner_uid;
                                        $arr['uri']           = $uri;
                                        $arr['parent-uri']    = $uri;
-                                       $arr['type']          = 'activity';
                                        $arr['wall']          = 1;
                                        $arr['contact-id']    = $owner_record['id'];
                                        $arr['owner-name']    = $owner_record['name'];
@@ -950,6 +951,7 @@ function photos_content(App $a)
        $contact        = null;
        $remote_contact = false;
        $contact_id     = 0;
+       $edit           = false;
 
        $owner_uid = $a->data['user']['uid'];
 
@@ -1443,7 +1445,6 @@ function photos_content(App $a)
                                        $comments .= replace_macros($cmnt_tpl, [
                                                '$return_path' => '',
                                                '$jsreload' => $return_url,
-                                               '$type' => 'wall-comment',
                                                '$id' => $link_item['id'],
                                                '$parent' => $link_item['id'],
                                                '$profile_uid' =>  $owner_uid,
@@ -1482,7 +1483,6 @@ function photos_content(App $a)
                                        $comments .= replace_macros($cmnt_tpl,[
                                                '$return_path' => '',
                                                '$jsreload' => $return_url,
-                                               '$type' => 'wall-comment',
                                                '$id' => $link_item['id'],
                                                '$parent' => $link_item['id'],
                                                '$profile_uid' =>  $owner_uid,
@@ -1543,7 +1543,6 @@ function photos_content(App $a)
                                                $comments .= replace_macros($cmnt_tpl, [
                                                        '$return_path' => '',
                                                        '$jsreload' => $return_url,
-                                                       '$type' => 'wall-comment',
                                                        '$id' => $item['item_id'],
                                                        '$parent' => $item['parent'],
                                                        '$profile_uid' =>  $owner_uid,