Trac #894 and #1013 - fixed bad redirects after delete notice

This commit is contained in:
Zach Copley 2009-02-05 16:16:10 -08:00
parent 8c8feb59b5
commit ab82978b2d
12 changed files with 36 additions and 1 deletions

View File

@ -42,6 +42,9 @@ class AllAction extends Action
if (!$this->page) { if (!$this->page) {
$this->page = 1; $this->page = 1;
} }
common_set_returnto($this->selfUrl());
return true; return true;
} }

View File

@ -134,6 +134,10 @@ class DeletenoticeAction extends DeleteAction
$url = common_get_returnto(); $url = common_get_returnto();
$urlval = ($url) ? $url : 'null';
common_debug("deleteNotice() - returnto url = $urlval");
if ($url) { if ($url) {
common_set_returnto(null); common_set_returnto(null);
} else { } else {

View File

@ -104,6 +104,9 @@ class FavoritedAction extends Action
{ {
parent::prepare($args); parent::prepare($args);
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
common_set_returnto($this->selfUrl());
return true; return true;
} }

View File

@ -48,6 +48,16 @@ require_once INSTALLDIR.'/lib/searchaction.php';
*/ */
class NoticesearchAction extends SearchAction class NoticesearchAction extends SearchAction
{ {
function prepare($args)
{
parent::prepare($args);
common_set_returnto($this->selfUrl());
return true;
}
/** /**
* Get instructions * Get instructions
* *

View File

@ -73,6 +73,9 @@ class PublicAction extends Action
{ {
parent::prepare($args); parent::prepare($args);
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
common_set_returnto($this->selfUrl());
return true; return true;
} }

View File

@ -83,6 +83,8 @@ class RepliesAction extends Action
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
common_set_returnto($this->selfUrl());
return true; return true;
} }

View File

@ -112,6 +112,8 @@ class ShowfavoritesAction extends Action
$this->page = 1; $this->page = 1;
} }
common_set_returnto($this->selfUrl());
return true; return true;
} }

View File

@ -129,6 +129,8 @@ class ShowgroupAction extends Action
return false; return false;
} }
common_set_returnto($this->selfUrl());
return true; return true;
} }

View File

@ -110,6 +110,8 @@ class ShowstreamAction extends Action
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
common_set_returnto($this->selfUrl());
return true; return true;
} }

View File

@ -37,6 +37,9 @@ class TagAction extends Action
} }
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1; $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
common_set_returnto($this->selfUrl());
return true; return true;
} }

View File

@ -63,6 +63,8 @@ class MailboxAction extends PersonalAction
$this->page = 1; $this->page = 1;
} }
common_set_returnto($this->selfUrl());
return true; return true;
} }

View File

@ -55,7 +55,6 @@ class PersonalAction extends Action
function handle($args) function handle($args)
{ {
parent::handle($args); parent::handle($args);
common_set_returnto($this->selfUrl());
} }
} }