]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - lib/subscriptionlist.php
Merge remote-tracking branch 'upstream/master'
[quix0rs-gnu-social.git] / lib / subscriptionlist.php
index f882b90c7f30b6e76094521914986943626ebd40..cc12d7efe3c15448a27a940e5a1a0435a241a3db 100644 (file)
@@ -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 $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));
-    }
-}