]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apigrouplist.php
Add repeat info to statusnet:notice_info Atom element
[quix0rs-gnu-social.git] / actions / apigrouplist.php
index 66b67a030e0899bf3aceb60e6ae568d748d6af59..dd2a68c66e9089fde8f63cc02c526ca05ad8dd4f 100644 (file)
@@ -66,7 +66,13 @@ class ApiGroupListAction extends ApiBareAuthAction
     {
         parent::prepare($args);
 
-        $this->user   = $this->getTargetUser($id);
+        $this->user   = $this->getTargetUser(null);
+
+        if (empty($this->user)) {
+            $this->clientError(_('No such user.'), 404, $this->format);
+            return false;
+        }
+
         $this->groups = $this->getGroups();
 
         return true;
@@ -86,21 +92,16 @@ class ApiGroupListAction extends ApiBareAuthAction
     {
         parent::handle($args);
 
-        if (empty($this->user)) {
-            $this->clientError(_('No such user.'), 404, $this->format);
-            return;
-        }
-
         $sitename   = common_config('site', 'name');
         $title      = sprintf(_("%s's groups"), $this->user->nickname);
-        $taguribase = common_config('integration', 'taguri');
+        $taguribase = TagURI::base();
         $id         = "tag:$taguribase:Groups";
         $link       = common_local_url(
             'usergroups',
             array('nickname' => $this->user->nickname)
         );
         $subtitle   = sprintf(
-            _("Groups %1$s is a member of on %2$s."),
+            _("Groups %1\$s is a member of on %2\$s."),
             $this->user->nickname,
             $sitename
         );
@@ -152,8 +153,7 @@ class ApiGroupListAction extends ApiBareAuthAction
             ($this->page - 1) * $this->count,
             $this->count,
             $this->since_id,
-            $this->max_id,
-            $this->since
+            $this->max_id
         );
 
         while ($group->fetch()) {