]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Directory/lib/sortablegrouplist.php
Issue #121 - use correct Group ID and strict User_group typing
[quix0rs-gnu-social.git] / plugins / Directory / lib / sortablegrouplist.php
index 94ee054df3a076a914fddea0fb54c62ff3665d54..0da705e9195a2527afe3cbe9daf9b55395db26eb 100644 (file)
@@ -196,7 +196,7 @@ class SortableGroupListItem extends SortableSubscriptionListItem
         $r2args['action'] = $action;
         if ($cur instanceof User && $cur->hasRight(Right::DELETEGROUP)) {
             $this->out->elementStart('li', 'entity_delete');
-            $df = new DeleteGroupForm($this->out, $this->profile, $r2args);
+            $df = new DeleteGroupForm($this->out, $this->profile->getGroup(), $r2args);
             $df->show();
             $this->out->elementEnd('li');
         }
@@ -224,10 +224,10 @@ class SortableGroupListItem extends SortableSubscriptionListItem
             // XXX: special-case for user looking at own
             // subscriptions page
             if ($user->isMember($this->profile->getGroup())) {
-                $lf = new LeaveForm($this->out, $this->profile);
+                $lf = new LeaveForm($this->out, $this->profile->getGroup());
                 $lf->show();
-            } else if (!Group_block::isBlocked($this->profile, $user->getProfile())) {
-                $jf = new JoinForm($this->out, $this->profile);
+            } else if (!Group_block::isBlocked($this->profile->getGroup(), $user->getProfile())) {
+                $jf = new JoinForm($this->out, $this->profile->getGroup());
                 $jf->show();
             }