X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fsubscriptionlist.php;h=cc12d7efe3c15448a27a940e5a1a0435a241a3db;hb=945920f24dba53d8367160b221bc842db0768fc4;hp=29c12744076b301527ed8837ced2226ef2e6268e;hpb=1ee79dc3791162f7ef9b92befaef597328266ce1;p=quix0rs-gnu-social.git diff --git a/lib/subscriptionlist.php b/lib/subscriptionlist.php index 29c1274407..cc12d7efe3 100644 --- a/lib/subscriptionlist.php +++ b/lib/subscriptionlist.php @@ -27,9 +27,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET') && !defined('LACONICA')) { - exit(1); -} +if (!defined('GNUSOCIAL')) { exit(1); } /** * Widget to show a list of subscriptions @@ -46,56 +44,15 @@ class SubscriptionList extends ProfileList /** Owner of this list */ var $owner = null; - function __construct($profile, $owner=null, $action=null) + public function __construct(Profile $profile, $owner=null, $action=null) { parent::__construct($profile, $action); $this->owner = $owner; } - function newListItem($profile) + public function newListItem(Profile $profile) { return new SubscriptionListItem($profile, $this->owner, $this->action); } } - -class SubscriptionListItem extends ProfileListItem -{ - /** Owner of this list */ - var $owner = null; - - function __construct($profile, $owner, $action) - { - parent::__construct($profile, $action); - - $this->owner = $owner; - } - - function showProfile() - { - $this->startProfile(); - $this->showAvatar($this->profile); - $this->showNickname(); - $this->showFullName(); - $this->showLocation(); - $this->showHomepage(); - $this->showBio(); - // Relevant portion! - $this->showTags(); - if ($this->isOwn()) { - $this->showOwnerControls(); - } - $this->endProfile(); - } - - function showOwnerControls() - { - // pass - } - - function isOwn() - { - $user = common_current_user(); - return (!empty($user) && ($this->owner->id == $user->id)); - } -}