]> git.mxchange.org Git - friendica.git/commitdiff
Merge pull request #10731 from annando/profile-writable
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 19 Sep 2021 14:13:36 +0000 (10:13 -0400)
committerGitHub <noreply@github.com>
Sun, 19 Sep 2021 14:13:36 +0000 (10:13 -0400)
Make posts on the profile page writable

include/conversation.php
src/Object/Thread.php

index 1cb2c745cc50a058a45d5382eb2a3d3cb1e2e543..507add97d61ef5f79a9c8db6bc0c21431dea1616 100644 (file)
@@ -312,7 +312,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
                                . "'; </script>\r\n";
                }
        } elseif ($mode === 'profile') {
-               $items = conversation_add_children($items, false, $order, $uid);
+               $items = conversation_add_children($items, false, $order, local_user());
 
                if (!$update) {
                        $tab = 'posts';
@@ -400,7 +400,7 @@ function conversation(App $a, array $items, $mode, $update, $preview = false, $o
        $formSecurityToken = BaseModule::getFormSecurityToken('contact_action');
 
        if (!empty($items)) {
-               if (in_array($mode, ['community', 'contacts'])) {
+               if (in_array($mode, ['community', 'contacts', 'profile'])) {
                        $writable = true;
                } else {
                        $writable = ($items[0]['uid'] == 0) && in_array($items[0]['network'], Protocol::FEDERATED);
index 7d59759a0da861ae3bbfbd91de9fcc0a7acf05c8..a2504a2ad170385ec9ba9bf4638bf5b5db249634 100644 (file)
@@ -80,7 +80,7 @@ class Thread
                                break;
                        case 'profile':
                                $this->profile_owner = $a->getProfileOwner();
-                               $this->writable = Security::canWriteToUserWall($this->profile_owner);
+                               $this->writable = Security::canWriteToUserWall($this->profile_owner) || $writable;
                                break;
                        case 'display':
                                $this->profile_owner = $a->getProfileOwner();