summaryrefslogtreecommitdiff
path: root/plugins/UserFlag
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2009-11-16 17:55:00 +0100
committerEvan Prodromou <evan@status.net>2009-11-16 17:55:00 +0100
commitbea580873f10c186a3e12047c28d693d3dcb26d2 (patch)
tree65aa1cd9f384e2620eee8cdbd1ebcd53918f4df6 /plugins/UserFlag
parent0580e824f0d650d9f9091be131916945951faba5 (diff)
use return-to method for adminprofileflag
Diffstat (limited to 'plugins/UserFlag')
-rw-r--r--plugins/UserFlag/adminprofileflag.php19
1 files changed, 12 insertions, 7 deletions
diff --git a/plugins/UserFlag/adminprofileflag.php b/plugins/UserFlag/adminprofileflag.php
index 629480991..1ac76b506 100644
--- a/plugins/UserFlag/adminprofileflag.php
+++ b/plugins/UserFlag/adminprofileflag.php
@@ -133,11 +133,16 @@ class FlaggedProfileList extends ProfileList {
class FlaggedProfileListItem extends ProfileListItem
{
var $user = null;
+ var $r2args = null;
function showActions()
{
$this->user = common_current_user();
+ list($action, $this->r2args) = $this->out->returnToArgs();
+
+ $this->r2args['action'] = $action;
+
$this->startActions();
if (Event::handle('StartProfileListItemActionElements', array($this))) {
$this->showSandboxButton();
@@ -153,11 +158,11 @@ class FlaggedProfileListItem extends ProfileListItem
{
if ($this->user->hasRight(Right::SANDBOXUSER)) {
$this->out->elementStart('li', 'entity_sandbox');
- if ($this->user->isSandboxed()) {
- $usf = new UnSandboxForm($this->out, $this->profile);
+ if ($this->profile->isSandboxed()) {
+ $usf = new UnSandboxForm($this->out, $this->profile, $this->r2args);
$usf->show();
} else {
- $sf = new SandboxForm($this->out, $this->profile);
+ $sf = new SandboxForm($this->out, $this->profile, $this->r2args);
$sf->show();
}
$this->out->elementEnd('li');
@@ -168,11 +173,11 @@ class FlaggedProfileListItem extends ProfileListItem
{
if ($this->user->hasRight(Right::SILENCEUSER)) {
$this->out->elementStart('li', 'entity_silence');
- if ($this->user->isSilenced()) {
- $usf = new UnSilenceForm($this->out, $this->profile);
+ if ($this->profile->isSilenced()) {
+ $usf = new UnSilenceForm($this->out, $this->profile, $this->r2args);
$usf->show();
} else {
- $sf = new SilenceForm($this->out, $this->profile);
+ $sf = new SilenceForm($this->out, $this->profile, $this->r2args);
$sf->show();
}
$this->out->elementEnd('li');
@@ -184,7 +189,7 @@ class FlaggedProfileListItem extends ProfileListItem
if ($this->user->hasRight(Right::DELETEUSER)) {
$this->out->elementStart('li', 'entity_delete');
- $df = new DeleteUserForm($this->out, $this->profile);
+ $df = new DeleteUserForm($this->out, $this->profile, $this->r2args);
$df->show();
$this->out->elementEnd('li');
}