From: Mikael Nordfeldth Date: Tue, 13 Jan 2015 11:56:56 +0000 (+0100) Subject: Those variables were set for a reason X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=bc51c6b64fe5443bb43562db440034c71826378a;p=quix0rs-gnu-social.git Those variables were set for a reason The ->_subscription variable etc. were set because they were used later. --- 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.'),