]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apigrouplist.php
Merge branch 'master' of git@gitorious.org:statusnet/mainline into testing
[quix0rs-gnu-social.git] / actions / apigrouplist.php
index 7a5aab72eb49d6a9624cbfc000cb924ce2bd2511..98fdb0497a3c3bb5e59194d254d25d04abc0e901 100644 (file)
@@ -21,6 +21,9 @@
  *
  * @category  API
  * @package   StatusNet
+ * @author    Craig Andrews <candrews@integralblue.com>
+ * @author    Evan Prodromou <evan@status.net>
+ * @author    Jeffery To <jeffery.to@gmail.com>
  * @author    Zach Copley <zach@status.net>
  * @copyright 2009 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
@@ -38,6 +41,9 @@ require_once INSTALLDIR . '/lib/apibareauth.php';
  *
  * @category API
  * @package  StatusNet
+ * @author   Craig Andrews <candrews@integralblue.com>
+ * @author   Evan Prodromou <evan@status.net>
+ * @author   Jeffery To <jeffery.to@gmail.com>
  * @author   Zach Copley <zach@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
@@ -59,7 +65,7 @@ class ApiGroupListAction extends ApiBareAuthAction
     function prepare($args)
     {
         parent::prepare($args);
-        
+
         $this->user   = $this->getTargetUser($id);
         $this->groups = $this->getGroups();
 
@@ -81,35 +87,35 @@ class ApiGroupListAction extends ApiBareAuthAction
         parent::handle($args);
 
         if (empty($this->user)) {
-            $this->clientError(_('No such user!'), 404, $this->format);
+            $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 %s is a member of on %s."),
+            _("Groups %1$s is a member of on %2$s."),
             $this->user->nickname,
             $sitename
         );
 
         switch($this->format) {
         case 'xml':
-            $this->show_xml_groups($this->groups);
+            $this->showXmlGroups($this->groups);
             break;
         case 'rss':
-            $this->show_rss_groups($this->groups, $title, $link, $subtitle);
+            $this->showRssGroups($this->groups, $title, $link, $subtitle);
             break;
         case 'atom':
             $selfuri = common_root_url() . 'api/statusnet/groups/list/' .
                 $this->user->id . '.atom';
-            $this->show_atom_groups(
+            $this->showAtomGroups(
                 $this->groups,
                 $title,
                 $id,
@@ -119,11 +125,11 @@ class ApiGroupListAction extends ApiBareAuthAction
             );
             break;
         case 'json':
-            $this->show_json_groups($this->groups);
+            $this->showJsonGroups($this->groups);
             break;
         default:
             $this->clientError(
-                _('API method not found!'),
+                _('API method not found.'),
                 404,
                 $this->format
             );
@@ -146,8 +152,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()) {