ensureProfile already done and stored in $this->oprofile

This commit is contained in:
Mikael Nordfeldth 2015-01-12 02:01:26 +01:00
parent d8f4de450c
commit 73669ed308
2 changed files with 1 additions and 4 deletions

View File

@ -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'));

View File

@ -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');
}
}