2016-01-06 09:30:12 +09:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (!defined('GNUSOCIAL')) { exit(1); }
|
|
|
|
|
|
|
|
class SubscriptionListItem extends ProfileListItem
|
|
|
|
{
|
|
|
|
/** Owner of this list */
|
|
|
|
var $owner = null;
|
|
|
|
|
2019-06-13 07:44:40 +09:00
|
|
|
// FIXME: TagSubs plugin sends a TagSub here, but should send a Profile and handle TagSub specifics itself?
|
|
|
|
function __construct($target, $owner, HTMLOutputter $action)
|
2016-01-06 09:30:12 +09:00
|
|
|
{
|
2019-06-13 07:44:40 +09:00
|
|
|
if ($owner instanceof Profile) {
|
|
|
|
parent::__construct($target, $action, $owner);
|
|
|
|
} else {
|
|
|
|
parent::__construct($target, $action);
|
|
|
|
}
|
2016-01-06 09:30:12 +09:00
|
|
|
|
|
|
|
$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));
|
|
|
|
}
|
|
|
|
}
|