]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/subscribers.php
[CORE] Added documentation and fixed typo in attachments action
[quix0rs-gnu-social.git] / actions / subscribers.php
index 2724927878c586d640c0a827317dd61e59993f3a..87489fb69a37e8842e462656149366c0df736b56 100644 (file)
@@ -92,7 +92,7 @@ class SubscribersAction extends GalleryAction
         }
 
         if ($subscribers) {
-            $subscribers_list = new SubscribersList($subscribers, $this->target, $this);
+            $subscribers_list = new SubscribersList($subscribers, $this->target->getUser(), $this);
             $cnt = $subscribers_list->show();
             if (0 == $cnt) {
                 $this->showEmptyListMessage();
@@ -132,64 +132,3 @@ class SubscribersAction extends GalleryAction
         parent::showSections();
     }
 }
-
-class SubscribersList extends SubscriptionList
-{
-    function newListItem($profile)
-    {
-        return new SubscribersListItem($profile, $this->owner, $this->action);
-    }
-}
-
-class SubscribersListItem extends SubscriptionListItem
-{
-    function showActions()
-    {
-        $this->startActions();
-        if (Event::handle('StartProfileListItemActionElements', array($this))) {
-            $this->showSubscribeButton();
-            // Relevant code!
-            $this->showBlockForm();
-            Event::handle('EndProfileListItemActionElements', array($this));
-        }
-        $this->endActions();
-    }
-
-    function showBlockForm()
-    {
-        $user = common_current_user();
-
-        if (!empty($user) && $this->owner->id == $user->id) {
-            $returnto = array('action' => 'subscribers',
-                              'nickname' => $this->owner->getNickname());
-            $page = $this->out->arg('page');
-            if ($page) {
-                $returnto['param-page'] = $page;
-            }
-            $bf = new BlockForm($this->out, $this->profile, $returnto);
-            $bf->show();
-        }
-    }
-
-    function linkAttributes()
-    {
-        $aAttrs = parent::linkAttributes();
-
-        if (common_config('nofollow', 'subscribers')) {
-            $aAttrs['rel'] .= ' nofollow';
-        }
-
-        return $aAttrs;
-    }
-
-    function homepageAttributes()
-    {
-        $aAttrs = parent::linkAttributes();
-
-        if (common_config('nofollow', 'subscribers')) {
-            $aAttrs['rel'] = 'nofollow';
-        }
-
-        return $aAttrs;
-    }
-}