X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Ffoafgroup.php;h=e0cec8866cd6d957894682653b4a7e7313307e27;hb=d2e6519bad041e50b4ae7df441e43fd2cfed46fc;hp=4db40c28bef2529e7407065bb837490e50abfc5e;hpb=39392e03a71d94d6b984033b994b417edfc2d8d6;p=quix0rs-gnu-social.git diff --git a/actions/foafgroup.php b/actions/foafgroup.php index 4db40c28be..e0cec8866c 100644 --- a/actions/foafgroup.php +++ b/actions/foafgroup.php @@ -27,6 +27,7 @@ if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); } +// @todo XXX: Documentation missing. class FoafGroupAction extends Action { function isReadOnly($args) @@ -34,15 +35,15 @@ class FoafGroupAction extends Action return true; } - function prepare($args) + function prepare(array $args = array()) { parent::prepare($args); $nickname_arg = $this->arg('nickname'); if (empty($nickname_arg)) { + // TRANS: Client error displayed when requesting Friends of a Friend feed without providing a group nickname. $this->clientError(_('No such group.'), 404); - return false; } $this->nickname = common_canonical_nickname($nickname_arg); @@ -56,18 +57,18 @@ class FoafGroupAction extends Action return false; } - $local = Local_group::staticGet('nickname', $this->nickname); + $local = Local_group::getKV('nickname', $this->nickname); if (!$local) { + // TRANS: Client error displayed when requesting Friends of a Friend feed for a non-local group. $this->clientError(_('No such group.'), 404); - return false; } - $this->group = User_group::staticGet('id', $local->group_id); + $this->group = User_group::getKV('id', $local->group_id); if (!$this->group) { + // TRANS: Client error displayed when requesting Friends of a Friend feed for a nickname that is not a group. $this->clientError(_('No such group.'), 404); - return false; } common_set_returnto($this->selfUrl()); @@ -75,9 +76,9 @@ class FoafGroupAction extends Action return true; } - function handle($args) + function handle() { - parent::handle($args); + parent::handle(); header('Content-Type: application/rdf+xml');