summaryrefslogtreecommitdiff
path: root/actions/showgroup.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/showgroup.php')
-rw-r--r--actions/showgroup.php12
1 files changed, 10 insertions, 2 deletions
diff --git a/actions/showgroup.php b/actions/showgroup.php
index eb1238902..4e1fcb6c7 100644
--- a/actions/showgroup.php
+++ b/actions/showgroup.php
@@ -122,9 +122,9 @@ class ShowgroupAction extends GroupDesignAction
return false;
}
- $this->group = User_group::staticGet('nickname', $nickname);
+ $local = Local_group::staticGet('nickname', $nickname);
- if (!$this->group) {
+ if (!$local) {
$alias = Group_alias::staticGet('alias', $nickname);
if ($alias) {
$args = array('id' => $alias->group_id);
@@ -134,11 +134,19 @@ class ShowgroupAction extends GroupDesignAction
common_redirect(common_local_url('groupbyid', $args), 301);
return false;
} else {
+ common_log(LOG_NOTICE, "Couldn't find local group for nickname '$nickname'");
$this->clientError(_('No such group.'), 404);
return false;
}
}
+ $this->group = User_group::staticGet('id', $local->group_id);
+
+ if (!$this->group) {
+ $this->clientError(_('No such group.'), 404);
+ return false;
+ }
+
common_set_returnto($this->selfUrl());
return true;