diff options
author | Craig Andrews <candrews@integralblue.com> | 2009-08-20 13:08:10 -0400 |
---|---|---|
committer | Craig Andrews <candrews@integralblue.com> | 2009-08-20 13:08:10 -0400 |
commit | 0d06055f408c4cbffe8ce8508468aa83e2804bf6 (patch) | |
tree | 8e354ec737b97747aa3a67dc68fc8a7c717cee8d /actions | |
parent | 986d95b31eeb4a56cb39f308b1e5a5aac2b2d04b (diff) | |
parent | b4c345392372ca39e0a5061b281df2074575e9d7 (diff) |
Merge commit 'cvollick/resolveAliases' into 0.8.x
Diffstat (limited to 'actions')
-rw-r--r-- | actions/showgroup.php | 14 |
1 files changed, 12 insertions, 2 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()); |