forked from GNUsocial/gnu-social
Updated ShowGroup to Resolve Aliases Again.
The way we find groups changed with this new Local_group table. I had to update this too.
This commit is contained in:
parent
0060163a76
commit
c95daacfdb
@ -125,14 +125,6 @@ class ShowgroupAction extends GroupDesignAction
|
||||
$local = Local_group::staticGet('nickname', $nickname);
|
||||
|
||||
if (!$local) {
|
||||
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) {
|
||||
$alias = Group_alias::staticGet('alias', $nickname);
|
||||
if ($alias) {
|
||||
$args = array('id' => $alias->group_id);
|
||||
@ -142,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;
|
||||
|
Loading…
Reference in New Issue
Block a user