diff --git a/actions/atompubshowmembership.php b/actions/atompubshowmembership.php index 1e9d66c56b..1619691769 100644 --- a/actions/atompubshowmembership.php +++ b/actions/atompubshowmembership.php @@ -67,7 +67,7 @@ class AtompubshowmembershipAction extends AtompubAction $this->_membership = Group_member::pkeyGet($kv); - if (!$this->_profile->isMembmer($this->_group)) { + if (!$this->_membership instanceof Group_member) { // TRANS: Client exception thrown when trying to show membership of a non-subscribed group throw new ClientException(_('Not a member.'), 404); } diff --git a/actions/atompubshowsubscription.php b/actions/atompubshowsubscription.php index 0d8c361519..ee5a477d49 100644 --- a/actions/atompubshowsubscription.php +++ b/actions/atompubshowsubscription.php @@ -70,7 +70,9 @@ class AtompubshowsubscriptionAction extends AtompubAction $subscribedId), 404); } - if (!$this->_subscriber->isSubscribed($this->_subscribed)) { + $this->_subscription = Subscription::pkeyGet(array('subscriber' => $subscriberId, + 'subscribed' => $subscribedId)); + if (!$this->_subscription instanceof Subscription) { // TRANS: Client exception thrown when trying to display a subscription for a non-subscribed profile ID. // TRANS: %1$d is the non-existing subscriber ID number, $2$d is the ID of the profile that was not subscribed to. $msg = sprintf(_('Profile %1$d not subscribed to profile %2$d.'),