]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/foafgroup.php
Merge branch 'nginx-sample' into 'nightly'
[quix0rs-gnu-social.git] / actions / foafgroup.php
index 07cca318114445dfc5a4f5ae3248186e7fea630c..f9c61ac5dcda9f7a409917ec569fc82e59d84af9 100644 (file)
@@ -27,6 +27,7 @@
 
 if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
 
+// @todo XXX: Documentation missing.
 class FoafGroupAction extends Action
 {
     function isReadOnly($args)
@@ -41,8 +42,8 @@ class FoafGroupAction extends Action
         $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());
@@ -126,7 +127,8 @@ class FoafGroupAction extends Action
         while ($members->fetch()) {
             $member_uri = common_local_url('userbyid', array('id'=>$members->id));
             $member_details[$member_uri] = array(
-                                        'nickname' => $members->nickname
+                                        'nickname' => $members->nickname,
+                                        'is_admin' => false,
                                         );
             $this->element('member', array('rdf:resource' => $member_uri));
         }