Commit ab82978b authored by Zach Copley's avatar Zach Copley

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

parent 8c8feb59
......@@ -42,6 +42,9 @@ class AllAction extends Action
if (!$this->page) {
$this->page = 1;
}
common_set_returnto($this->selfUrl());
return true;
}
......
......@@ -134,6 +134,10 @@ class DeletenoticeAction extends DeleteAction
$url = common_get_returnto();
$urlval = ($url) ? $url : 'null';
common_debug("deleteNotice() - returnto url = $urlval");
if ($url) {
common_set_returnto(null);
} else {
......
......@@ -104,6 +104,9 @@ class FavoritedAction extends Action
{
parent::prepare($args);
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
common_set_returnto($this->selfUrl());
return true;
}
......
......@@ -48,6 +48,16 @@ require_once INSTALLDIR.'/lib/searchaction.php';
*/
class NoticesearchAction extends SearchAction
{
function prepare($args)
{
parent::prepare($args);
common_set_returnto($this->selfUrl());
return true;
}
/**
* Get instructions
*
......
......@@ -73,6 +73,9 @@ class PublicAction extends Action
{
parent::prepare($args);
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
common_set_returnto($this->selfUrl());
return true;
}
......
......@@ -83,6 +83,8 @@ class RepliesAction extends Action
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
common_set_returnto($this->selfUrl());
return true;
}
......
......@@ -112,6 +112,8 @@ class ShowfavoritesAction extends Action
$this->page = 1;
}
common_set_returnto($this->selfUrl());
return true;
}
......
......@@ -129,6 +129,8 @@ class ShowgroupAction extends Action
return false;
}
common_set_returnto($this->selfUrl());
return true;
}
......
......@@ -110,6 +110,8 @@ class ShowstreamAction extends Action
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
common_set_returnto($this->selfUrl());
return true;
}
......
......@@ -37,6 +37,9 @@ class TagAction extends Action
}
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
common_set_returnto($this->selfUrl());
return true;
}
......
......@@ -63,6 +63,8 @@ class MailboxAction extends PersonalAction
$this->page = 1;
}
common_set_returnto($this->selfUrl());
return true;
}
......
......@@ -55,7 +55,6 @@ class PersonalAction extends Action
function handle($args)
{
parent::handle($args);
common_set_returnto($this->selfUrl());
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment