diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-03-23 15:55:07 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-03-23 15:55:07 -0400 |
commit | 8c073a34ce472fc8d0385659a222339a5ba4254a (patch) | |
tree | 57c83c48333b52a93b84d0910f9450c210e1815c /actions/shownotice.php | |
parent | b3a0eea3b66e95becb6c4595ed71c7fe71ed6437 (diff) | |
parent | 14afe2d26874ed30a0ccef5e0acda2c5171afcde (diff) |
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'actions/shownotice.php')
-rw-r--r-- | actions/shownotice.php | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/actions/shownotice.php b/actions/shownotice.php index d5f35cd84..ccae49bb3 100644 --- a/actions/shownotice.php +++ b/actions/shownotice.php @@ -177,10 +177,17 @@ class ShownoticeAction extends Action { parent::handle($args); - $this->showPage(); + if ($this->notice->is_local == 0) { + if (!empty($this->notice->url)) { + common_redirect($this->notice->url, 301); + } else if (!empty($this->notice->uri) && preg_match('/^https?:/', $this->notice->uri)) { + common_redirect($this->notice->uri, 301); + } + } else { + $this->showPage(); + } } - /** * Don't show local navigation * @@ -191,7 +198,6 @@ class ShownoticeAction extends Action { } - /** * Fill the content area of the page * @@ -208,8 +214,6 @@ class ShownoticeAction extends Action $this->elementEnd('ul'); } - - /** * Don't show page notice * @@ -220,7 +224,6 @@ class ShownoticeAction extends Action { } - /** * Don't show aside * @@ -230,7 +233,6 @@ class ShownoticeAction extends Action function showAside() { } - /** * Extra <head> content * |