From fd1327220663699801945f681f9eb5cba90fbc40 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Fri, 12 Dec 2008 00:57:13 -0500 Subject: [PATCH] don't show form if subscription can't be found (weirdly) darcs-hash:20081212055713-84dde-1b2aa99861ee0ab7c63a48152a5590b4d2f360d9.gz --- actions/subscriptions.php | 5 +++++ 1 file changed, 5 insertions(+) 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', -- 2.39.5