* @link http://status.net/
*/
-if (!defined('LACONICA')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
exit(1);
}
}
if (!$nickname) {
- $this->clientError(_('No nickname'), 404);
+ $this->clientError(_('No nickname.'), 404);
return false;
}
- $this->group = User_group::staticGet('nickname', $nickname);
+ $local = Local_group::staticGet('nickname', $nickname);
+
+ if (!$local) {
+ $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);
+ $this->clientError(_('No such group.'), 404);
return false;
}
return sprintf(_('%s blocked profiles'),
$this->group->nickname);
} else {
- return sprintf(_('%s blocked profiles, page %d'),
+ return sprintf(_('%1$s blocked profiles, page %2$d'),
$this->group->nickname,
$this->page);
}