]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - lib/subscriptionlistitem.php
Introduced common_location_shared() to check if location sharing is always,
[quix0rs-gnu-social.git] / lib / subscriptionlistitem.php
1 <?php
2
3 if (!defined('GNUSOCIAL')) { exit(1); }
4
5 class SubscriptionListItem extends ProfileListItem
6 {
7     /** Owner of this list */
8     var $owner = null;
9
10     function __construct(Profile $profile, $owner, $action)
11     {
12         parent::__construct($profile, $action);
13
14         $this->owner = $owner;
15     }
16
17     function showProfile()
18     {
19         $this->startProfile();
20         $this->showAvatar($this->profile);
21         $this->showNickname();
22         $this->showFullName();
23         $this->showLocation();
24         $this->showHomepage();
25         $this->showBio();
26         // Relevant portion!
27         $this->showTags();
28         if ($this->isOwn()) {
29             $this->showOwnerControls();
30         }
31         $this->endProfile();
32     }
33
34     function showOwnerControls()
35     {
36         // pass
37     }
38
39     function isOwn()
40     {
41         $user = common_current_user();
42         return (!empty($user) && ($this->owner->id == $user->id));
43     }
44 }