From: Evan Prodromou Date: Fri, 12 Dec 2008 05:57:13 +0000 (-0500) Subject: don't show form if subscription can't be found (weirdly) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=fd1327220663699801945f681f9eb5cba90fbc40;p=quix0rs-gnu-social.git don't show form if subscription can't be found (weirdly) darcs-hash:20081212055713-84dde-1b2aa99861ee0ab7c63a48152a5590b4d2f360d9.gz --- diff --git a/actions/subscriptions.php b/actions/subscriptions.php index d55c15abd7..f518a1f92d 100644 --- a/actions/subscriptions.php +++ b/actions/subscriptions.php @@ -56,8 +56,13 @@ class SubscriptionsAction extends GalleryAction { class SubscriptionsList extends ProfileList { function show_owner_controls($profile) { + $sub = Subscription::pkeyGet(array('subscriber' => $this->owner->id, 'subscribed' => $profile->id)); + if (!$sub) { + return; + } + common_element_start('form', array('id' => 'subedit-' . $profile->id, 'method' => 'post', 'class' => 'subedit',