]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Cleaning up Directory plugin lists
authorMikael Nordfeldth <mmn@hethane.se>
Fri, 10 Jul 2015 21:19:54 +0000 (23:19 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Fri, 10 Jul 2015 21:19:54 +0000 (23:19 +0200)
lib/profilelistitem.php
plugins/Directory/lib/sortablegrouplist.php
plugins/Directory/lib/sortablesubscriptionlist.php

index e21ff04ebe29209812884756fef389398d2c1253..6fe7b99c7b3a967515815df5a3e1bde0c425fa04 100644 (file)
@@ -37,7 +37,8 @@ class ProfileListItem extends Widget
     /** Action object using us. */
     var $action = null;
 
-    function __construct(Profile $target, HTMLOutputter $action)
+    // FIXME: Directory plugin sends a User_group here, but should send a Profile and handle User_group specifics itself
+    function __construct($target, HTMLOutputter $action)
     {
         parent::__construct($action);
 
index 7474d0daa608f9cfa9a037a8da1b4f71bf11e13a..ab00068f6d20a5f438794e1986dc3d07a98db8b8 100644 (file)
  * @link      http://status.net/
  */
 
-if (!defined('STATUSNET')) {
-    exit(1);
-}
-
-require_once INSTALLDIR . '/lib/subscriptionlist.php';
+if (!defined('GNUSOCIAL')) { exit(1); }
 
 /**
  * Widget to show a sortable list of subscriptions
@@ -44,16 +40,6 @@ require_once INSTALLDIR . '/lib/subscriptionlist.php';
  */
 class SortableGroupList extends SortableSubscriptionList
 {
-    /** Owner of this list */
-    var $owner = null;
-
-    function __construct($profile, $owner=null, $action=null)
-    {
-        parent::__construct($profile, $owner, $action);
-
-        $this->owner = $owner;
-    }
-
     function startList()
     {
         $this->out->elementStart('table', array('class' => 'profile_list xoxo'));
@@ -119,25 +105,14 @@ class SortableGroupList extends SortableSubscriptionList
         $this->out->elementStart('tbody');
     }
 
-    function newListItem($profile, $odd)
+    function newListItem($profile)
     {
-        return new SortableGroupListItem($profile, $this->owner, $this->action, $odd);
+        return new SortableGroupListItem($profile, $this->owner, $this->action);
     }
 }
 
 class SortableGroupListItem extends SortableSubscriptionListItem
 {
-    /** Owner of this list */
-    var $owner = null;
-
-    function __construct($profile, $owner, $action, $alt)
-    {
-        parent::__construct($profile, $owner, $action, $alt);
-
-        $this->alt   = $alt; // is this row alternate?
-        $this->owner = $owner;
-    }
-
     function showHomepage()
     {
         if (!empty($this->profile->homepage)) {
index d6df6c64cda02b44ba29ba0c94122b65cf7c68f8..719834bc917d3aa9c5e17a74c0e63e9470646725 100644 (file)
@@ -40,16 +40,6 @@ if (!defined('GNUSOCIAL')) { exit(1); }
  */
 class SortableSubscriptionList extends SubscriptionList
 {
-    /** Owner of this list */
-    var $owner = null;
-
-    function __construct($profile, $owner=null, $action=null)
-    {
-        parent::__construct($profile, $owner, $action);
-
-        $this->owner = $owner;
-    }
-
     function startList()
     {
         $this->out->elementStart('table', array('class' => 'profile_list xoxo'));
@@ -132,16 +122,6 @@ class SortableSubscriptionList extends SubscriptionList
 
 class SortableSubscriptionListItem extends SubscriptionListItem
 {
-    /** Owner of this list */
-    var $owner = null;
-
-    function __construct($profile, $owner, $action)
-    {
-        parent::__construct($profile, $owner, $action);
-
-        $this->owner = $owner;
-    }
-
     function startItem()
     {
         $attr = array(