]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/groupmembers.php
push notices through the bridge if they're in reply to a twitter notice
[quix0rs-gnu-social.git] / actions / groupmembers.php
index fb4e46dbc0ea145e40b58a626d5efbfce44c47d8..54f1d8dcda748e8fb112c6042e9d4a14ac1f0ca7 100644 (file)
@@ -205,8 +205,7 @@ class GroupMemberListItem extends ProfileListItem
             !$this->profile->isAdmin($this->group)) {
             $this->out->elementStart('li', 'entity_make_admin');
             $maf = new MakeAdminForm($this->out, $this->profile, $this->group,
-                                     array('action' => 'groupmembers',
-                                           'nickname' => $this->group->nickname));
+                                     $this->returnToArgs());
             $maf->show();
             $this->out->elementEnd('li');
         }
@@ -220,8 +219,7 @@ class GroupMemberListItem extends ProfileListItem
         if (!empty($user) && $user->id != $this->profile->id && $user->isAdmin($this->group)) {
             $this->out->elementStart('li', 'entity_block');
             $bf = new GroupBlockForm($this->out, $this->profile, $this->group,
-                                array('action' => 'groupmembers',
-                                      'nickname' => $this->group->nickname));
+                                     $this->returnToArgs());
             $bf->show();
             $this->out->elementEnd('li');
         }
@@ -240,9 +238,30 @@ class GroupMemberListItem extends ProfileListItem
 
     function homepageAttributes()
     {
+        $aAttrs = parent::linkAttributes();
+
         if (common_config('nofollow', 'members')) {
             $aAttrs['rel'] = 'nofollow';
         }
+
+        return $aAttrs;
+    }
+
+    /**
+     * Fetch necessary return-to arguments for the profile forms
+     * to return to this list when they're done.
+     * 
+     * @return array
+     */
+    protected function returnToArgs()
+    {
+        $args = array('action' => 'groupmembers',
+                      'nickname' => $this->group->nickname);
+        $page = $this->out->arg('page');
+        if ($page) {
+            $args['param-page'] = $page;
+        }
+        return $args;
     }
 }