X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FDirectory%2Flib%2Fsortablegrouplist.php;h=fe0e1bcf676d041d8b8e52c4abf571ed1479dec8;hb=d6b28c64830f632bb2f4b6f3c9369b9e56ad217a;hp=7474d0daa608f9cfa9a037a8da1b4f71bf11e13a;hpb=bb31394cce356677c835717f775ee795ef700087;p=quix0rs-gnu-social.git diff --git a/plugins/Directory/lib/sortablegrouplist.php b/plugins/Directory/lib/sortablegrouplist.php index 7474d0daa6..fe0e1bcf67 100644 --- a/plugins/Directory/lib/sortablegrouplist.php +++ b/plugins/Directory/lib/sortablegrouplist.php @@ -27,11 +27,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET')) { - exit(1); -} - -require_once INSTALLDIR . '/lib/subscriptionlist.php'; +if (!defined('GNUSOCIAL')) { exit(1); } /** * Widget to show a sortable list of subscriptions @@ -44,16 +40,6 @@ require_once INSTALLDIR . '/lib/subscriptionlist.php'; */ class SortableGroupList extends SortableSubscriptionList { - /** Owner of this list */ - var $owner = null; - - function __construct($profile, $owner=null, $action=null) - { - parent::__construct($profile, $owner, $action); - - $this->owner = $owner; - } - function startList() { $this->out->elementStart('table', array('class' => 'profile_list xoxo')); @@ -119,25 +105,14 @@ class SortableGroupList extends SortableSubscriptionList $this->out->elementStart('tbody'); } - function newListItem($profile, $odd) + function newListItem($profile) { - return new SortableGroupListItem($profile, $this->owner, $this->action, $odd); + return new SortableGroupListItem($profile, $this->owner, $this->action); } } class SortableGroupListItem extends SortableSubscriptionListItem { - /** Owner of this list */ - var $owner = null; - - function __construct($profile, $owner, $action, $alt) - { - parent::__construct($profile, $owner, $action, $alt); - - $this->alt = $alt; // is this row alternate? - $this->owner = $owner; - } - function showHomepage() { if (!empty($this->profile->homepage)) { @@ -251,8 +226,8 @@ class SortableGroupListItem extends SortableSubscriptionListItem function showJoinButton() { $user = $this->owner; - if ($user) { + if ($user instanceof User) { $this->out->elementStart('li', 'entity_subscribe'); // XXX: special-case for user looking at own // subscriptions page