X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fsubscriptionlist.php;h=cc12d7efe3c15448a27a940e5a1a0435a241a3db;hb=feb97cfc2288169fbf8f1f47393c9735c017eeb6;hp=36dcbf65f81227681a22ae875a9b9a4b8080c946;hpb=8884a5255fb90fda67b63fa0d4252d77176337e5;p=quix0rs-gnu-social.git diff --git a/lib/subscriptionlist.php b/lib/subscriptionlist.php index 36dcbf65f8..cc12d7efe3 100644 --- a/lib/subscriptionlist.php +++ b/lib/subscriptionlist.php @@ -27,11 +27,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET') && !defined('LACONICA')) { - exit(1); -} - -require_once INSTALLDIR.'/lib/profilelist.php'; +if (!defined('GNUSOCIAL')) { exit(1); } /** * Widget to show a list of subscriptions @@ -48,47 +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->showFullName(); - $this->showLocation(); - $this->showHomepage(); - $this->showBio(); - // Relevant portion! - $this->showTags(); - $this->endProfile(); - } - - function isOwn() - { - $user = common_current_user(); - return (!empty($user) && ($this->owner->id == $user->id)); - } -}