diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-08-21 15:30:03 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-08-21 15:30:03 -0400 |
commit | 9f07921b45190b462e1a798622068e24ef31e124 (patch) | |
tree | 45ba802a5aa64c44faa4319749220e266f9cf1ee /actions | |
parent | 041d2d82d3db92368913466869688cb5fa2554c8 (diff) | |
parent | a8d35451823b01c074d5417a138d4968331a8130 (diff) |
Merge branch '0.8.x' of git@gitorious.org:laconica/mainline into 0.8.x
Diffstat (limited to 'actions')
-rw-r--r-- | actions/showgroup.php | 14 | ||||
-rw-r--r-- | actions/shownotice.php | 2 |
2 files changed, 13 insertions, 3 deletions
diff --git a/actions/showgroup.php b/actions/showgroup.php index 4d8ba5fa8..b0cc1dbc7 100644 --- a/actions/showgroup.php +++ b/actions/showgroup.php @@ -130,8 +130,18 @@ class ShowgroupAction extends GroupDesignAction $this->group = User_group::staticGet('nickname', $nickname); if (!$this->group) { - $this->clientError(_('No such group'), 404); - return false; + $alias = Group_alias::staticGet('alias', $nickname); + if ($alias) { + $args = array('id' => $alias->group_id); + if ($this->page != 1) { + $args['page'] = $this->page; + } + common_redirect(common_local_url('groupbyid', $args), 301); + return false; + } else { + $this->clientError(_('No such group'), 404); + return false; + } } common_set_returnto($this->selfUrl()); diff --git a/actions/shownotice.php b/actions/shownotice.php index 8f2ffd6b9..fb15dddcf 100644 --- a/actions/shownotice.php +++ b/actions/shownotice.php @@ -190,7 +190,7 @@ class ShownoticeAction extends OwnerDesignAction { parent::handle($args); - if ($this->notice->is_local == 0) { + if ($this->notice->is_local == Notice::REMOTE_OMB) { if (!empty($this->notice->url)) { common_redirect($this->notice->url, 301); } else if (!empty($this->notice->uri) && preg_match('/^https?:/', $this->notice->uri)) { |