From 73669ed308f998f130728bcf6244d01c90a1914b Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Mon, 12 Jan 2015 02:01:26 +0100 Subject: [PATCH] ensureProfile already done and stored in $this->oprofile --- plugins/OStatus/actions/groupsalmon.php | 2 -- plugins/OStatus/lib/salmonaction.php | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/OStatus/actions/groupsalmon.php b/plugins/OStatus/actions/groupsalmon.php index 6ecefa7f7d..a255a3d022 100644 --- a/plugins/OStatus/actions/groupsalmon.php +++ b/plugins/OStatus/actions/groupsalmon.php @@ -88,7 +88,6 @@ class GroupsalmonAction extends SalmonAction } } - $profile = $this->ensureProfile(); $this->saveNotice(); } @@ -153,7 +152,6 @@ class GroupsalmonAction extends SalmonAction */ function handleLeave() { - // ensureProfile throws exception on failure if ($this->oprofile->isGroup()) { // TRANS: Client error displayed when trying to have a group join another group. throw new AlreadyFulfilledException(_m('Groups cannot be members of groups')); diff --git a/plugins/OStatus/lib/salmonaction.php b/plugins/OStatus/lib/salmonaction.php index ace5daf86a..eb3a62da32 100644 --- a/plugins/OStatus/lib/salmonaction.php +++ b/plugins/OStatus/lib/salmonaction.php @@ -264,7 +264,6 @@ class SalmonAction extends Action function saveNotice() { - $oprofile = $this->ensureProfile(); - return $oprofile->processPost($this->activity, 'salmon'); + return $this->oprofile->processPost($this->activity, 'salmon'); } } -- 2.39.5