]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
don't show form if subscription can't be found (weirdly)
authorEvan Prodromou <evan@prodromou.name>
Fri, 12 Dec 2008 05:57:13 +0000 (00:57 -0500)
committerEvan Prodromou <evan@prodromou.name>
Fri, 12 Dec 2008 05:57:13 +0000 (00:57 -0500)
darcs-hash:20081212055713-84dde-1b2aa99861ee0ab7c63a48152a5590b4d2f360d9.gz

actions/subscriptions.php

index d55c15abd7df8e21d191685c0f2c89ece16c3bb7..f518a1f92deac061e950a6b4730c11356067bc3f 100644 (file)
@@ -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',