summaryrefslogtreecommitdiff
path: root/actions/showgroup.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-08-21 15:30:03 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-08-21 15:30:03 -0400
commit9f07921b45190b462e1a798622068e24ef31e124 (patch)
tree45ba802a5aa64c44faa4319749220e266f9cf1ee /actions/showgroup.php
parent041d2d82d3db92368913466869688cb5fa2554c8 (diff)
parenta8d35451823b01c074d5417a138d4968331a8130 (diff)
Merge branch '0.8.x' of git@gitorious.org:laconica/mainline into 0.8.x
Diffstat (limited to 'actions/showgroup.php')
-rw-r--r--actions/showgroup.php14
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());