]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/subscribers.php
gc inboxes on a regular basis
[quix0rs-gnu-social.git] / actions / subscribers.php
index 7ebb54d33d6b6b00204bf8df7806650afd10f9d1..66ac00fb19aa26d64da5441d07fafec8bc08f36a 100644 (file)
@@ -118,20 +118,46 @@ class SubscribersAction extends GalleryAction
         $this->raw(common_markup_to_html($message));
         $this->elementEnd('div');
     }
+
+    function showSections()
+    {
+        parent::showSections();
+        $cloud = new SubscribersPeopleTagCloudSection($this);
+        $cloud->show();
+
+        $cloud2 = new SubscribersPeopleSelfTagCloudSection($this);
+        $cloud2->show();
+    }
 }
 
-class SubscribersList extends ProfileList
+class SubscribersList extends SubscriptionList
 {
-    function showBlockForm()
+    function newListItem($profile)
     {
-        $bf = new BlockForm($this->out, $this->profile,
-                            array('action' => 'subscribers',
-                                  'nickname' => $this->owner->nickname));
-        $bf->show();
+        return new SubscribersListItem($profile, $this->owner, $this->action);
     }
+}
 
-    function isReadOnly()
+class SubscribersListItem extends SubscriptionListItem
+{
+    function showActions()
     {
-        return true;
+        $this->startActions();
+        $this->showSubscribeButton();
+        // Relevant code!
+        $this->showBlockForm();
+        $this->endActions();
+    }
+
+    function showBlockForm()
+    {
+        $user = common_current_user();
+
+        if (!empty($user) && $this->owner->id == $user->id) {
+            $bf = new BlockForm($this->out, $this->profile,
+                                array('action' => 'subscribers',
+                                      'nickname' => $this->owner->nickname));
+            $bf->show();
+        }
     }
 }