X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=src%2FObject%2FThread.php;h=7d59759a0da861ae3bbfbd91de9fcc0a7acf05c8;hb=a65fbcebe785d33a8053645cb73dfd11d032a940;hp=f62b14c71e665ef9bb996d5a9e376ad12e118cec;hpb=d6ed0068e6c8bf513e40a5d29b73d100f664261b;p=friendica.git diff --git a/src/Object/Thread.php b/src/Object/Thread.php index f62b14c71e..7d59759a0d 100644 --- a/src/Object/Thread.php +++ b/src/Object/Thread.php @@ -1,6 +1,6 @@ writable = true; break; case 'profile': - $this->profile_owner = $a->profile['uid']; + $this->profile_owner = $a->getProfileOwner(); $this->writable = Security::canWriteToUserWall($this->profile_owner); break; case 'display': - $this->profile_owner = $a->profile['uid']; + $this->profile_owner = $a->getProfileOwner(); $this->writable = Security::canWriteToUserWall($this->profile_owner) || $writable; break; case 'community': @@ -190,12 +190,13 @@ class Thread * We should find a way to avoid using those arguments (at least most of them) * * @param array $conv_responses data + * @param string $formSecurityToken A security Token to avoid CSF attacks * * @return mixed The data requested on success * false on failure * @throws \Exception */ - public function getTemplateData($conv_responses) + public function getTemplateData($conv_responses, string $formSecurityToken) { $result = []; @@ -204,7 +205,7 @@ class Thread continue; } - $item_data = $item->getTemplateData($conv_responses); + $item_data = $item->getTemplateData($conv_responses, $formSecurityToken); if (!$item_data) { Logger::log('[ERROR] Conversation::getTemplateData : Failed to get item template data ('. $item->getId() .').', Logger::DEBUG);