]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/rsd.php
Added new 'Scroller' plugin from @buttle which aims to replace the out-dated
[quix0rs-gnu-social.git] / actions / rsd.php
index e02c85c41b42b2977a15dad2834456d8759f3a15..6a070aeb1a525a22a992d5817e3d29460a2f5369 100644 (file)
@@ -68,13 +68,11 @@ if (!defined('STATUSNET')) {
  * @license  http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
  * @link     http://status.net/
  */
-
 class RsdAction extends Action
 {
     /**
      * Optional attribute for the personal rsd.xml file.
      */
-
     var $user = null;
 
     /**
@@ -87,8 +85,7 @@ class RsdAction extends Action
      *
      * @return boolean success flag
      */
-
-    function prepare($args)
+    function prepare(array $args=array())
     {
         parent::prepare($args);
 
@@ -104,17 +101,14 @@ class RsdAction extends Action
             // Permanent redirect on non-canonical nickname
 
             if ($nickname_arg != $nickname) {
-                common_redirect(common_local_url('rsd',
-                                                 array('nickname' => $nickname)),
-                                301);
-                return false;
+                common_redirect(common_local_url('rsd', array('nickname' => $nickname)), 301);
             }
 
-            $this->user = User::staticGet('nickname', $nickname);
+            $this->user = User::getKV('nickname', $nickname);
 
             if (empty($this->user)) {
+                // TRANS: Client error.
                 $this->clientError(_('No such user.'), 404);
-                return false;
             }
         }
 
@@ -132,8 +126,7 @@ class RsdAction extends Action
      *
      * @return nothing
      */
-
-    function handle($args)
+    function handle(array $args=array())
     {
         header('Content-Type: application/rsd+xml');
 
@@ -143,6 +136,7 @@ class RsdAction extends Action
         $this->elementStart('rsd', array('version' => '1.0',
                                          'xmlns' => $rsdNS));
         $this->elementStart('service');
+        // TRANS: Engine name for RSD.
         $this->element('engineName', null, _('StatusNet'));
         $this->element('engineLink', null, 'http://status.net/');
         $this->elementStart('apis');
@@ -195,7 +189,6 @@ class RsdAction extends Action
      *
      * @return string date of last change of this page
      */
-
     function lastModified()
     {
         if (!empty($this->user)) {
@@ -214,8 +207,7 @@ class RsdAction extends Action
      *
      * @return boolean true
      */
-
-    function isReadOnly($args)
+    function isReadOnly(array $args=array())
     {
         return true;
     }
@@ -228,7 +220,6 @@ class RsdAction extends Action
      *
      * @return string API root URI for this site
      */
-
     private function _apiRoot()
     {
         if (common_config('site', 'fancy')) {