summaryrefslogtreecommitdiff
path: root/actions/groupmembers.php
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-04-09 08:40:15 -0700
committerBrion Vibber <brion@pobox.com>2010-04-09 08:40:15 -0700
commit1f8451f4aa9128e55d4b274faf7f0cd19d56e2b8 (patch)
tree3b3d27baa6a9fce818e858073a37ba7f88524718 /actions/groupmembers.php
parent857db1fabe8dc1d4420abad74d574c536b120ad5 (diff)
parent2be04e2a631ea9f373386bed792e7233418e2ee2 (diff)
Merge branch 'testing' into 0.9.x
Diffstat (limited to 'actions/groupmembers.php')
-rw-r--r--actions/groupmembers.php23
1 files changed, 19 insertions, 4 deletions
diff --git a/actions/groupmembers.php b/actions/groupmembers.php
index fb4e46dbc..6d0701239 100644
--- a/actions/groupmembers.php
+++ b/actions/groupmembers.php
@@ -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');
}
@@ -244,6 +242,23 @@ class GroupMemberListItem extends ProfileListItem
$aAttrs['rel'] = 'nofollow';
}
}
+
+ /**
+ * 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;
+ }
}
/**