use return-to method for adminprofileflag
This commit is contained in:
parent
0580e824f0
commit
bea580873f
|
@ -133,11 +133,16 @@ class FlaggedProfileList extends ProfileList {
|
||||||
class FlaggedProfileListItem extends ProfileListItem
|
class FlaggedProfileListItem extends ProfileListItem
|
||||||
{
|
{
|
||||||
var $user = null;
|
var $user = null;
|
||||||
|
var $r2args = null;
|
||||||
|
|
||||||
function showActions()
|
function showActions()
|
||||||
{
|
{
|
||||||
$this->user = common_current_user();
|
$this->user = common_current_user();
|
||||||
|
|
||||||
|
list($action, $this->r2args) = $this->out->returnToArgs();
|
||||||
|
|
||||||
|
$this->r2args['action'] = $action;
|
||||||
|
|
||||||
$this->startActions();
|
$this->startActions();
|
||||||
if (Event::handle('StartProfileListItemActionElements', array($this))) {
|
if (Event::handle('StartProfileListItemActionElements', array($this))) {
|
||||||
$this->showSandboxButton();
|
$this->showSandboxButton();
|
||||||
|
@ -153,11 +158,11 @@ class FlaggedProfileListItem extends ProfileListItem
|
||||||
{
|
{
|
||||||
if ($this->user->hasRight(Right::SANDBOXUSER)) {
|
if ($this->user->hasRight(Right::SANDBOXUSER)) {
|
||||||
$this->out->elementStart('li', 'entity_sandbox');
|
$this->out->elementStart('li', 'entity_sandbox');
|
||||||
if ($this->user->isSandboxed()) {
|
if ($this->profile->isSandboxed()) {
|
||||||
$usf = new UnSandboxForm($this->out, $this->profile);
|
$usf = new UnSandboxForm($this->out, $this->profile, $this->r2args);
|
||||||
$usf->show();
|
$usf->show();
|
||||||
} else {
|
} else {
|
||||||
$sf = new SandboxForm($this->out, $this->profile);
|
$sf = new SandboxForm($this->out, $this->profile, $this->r2args);
|
||||||
$sf->show();
|
$sf->show();
|
||||||
}
|
}
|
||||||
$this->out->elementEnd('li');
|
$this->out->elementEnd('li');
|
||||||
|
@ -168,11 +173,11 @@ class FlaggedProfileListItem extends ProfileListItem
|
||||||
{
|
{
|
||||||
if ($this->user->hasRight(Right::SILENCEUSER)) {
|
if ($this->user->hasRight(Right::SILENCEUSER)) {
|
||||||
$this->out->elementStart('li', 'entity_silence');
|
$this->out->elementStart('li', 'entity_silence');
|
||||||
if ($this->user->isSilenced()) {
|
if ($this->profile->isSilenced()) {
|
||||||
$usf = new UnSilenceForm($this->out, $this->profile);
|
$usf = new UnSilenceForm($this->out, $this->profile, $this->r2args);
|
||||||
$usf->show();
|
$usf->show();
|
||||||
} else {
|
} else {
|
||||||
$sf = new SilenceForm($this->out, $this->profile);
|
$sf = new SilenceForm($this->out, $this->profile, $this->r2args);
|
||||||
$sf->show();
|
$sf->show();
|
||||||
}
|
}
|
||||||
$this->out->elementEnd('li');
|
$this->out->elementEnd('li');
|
||||||
|
@ -184,7 +189,7 @@ class FlaggedProfileListItem extends ProfileListItem
|
||||||
|
|
||||||
if ($this->user->hasRight(Right::DELETEUSER)) {
|
if ($this->user->hasRight(Right::DELETEUSER)) {
|
||||||
$this->out->elementStart('li', 'entity_delete');
|
$this->out->elementStart('li', 'entity_delete');
|
||||||
$df = new DeleteUserForm($this->out, $this->profile);
|
$df = new DeleteUserForm($this->out, $this->profile, $this->r2args);
|
||||||
$df->show();
|
$df->show();
|
||||||
$this->out->elementEnd('li');
|
$this->out->elementEnd('li');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user