]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/rsd.php
Merge branch '0.9.x' of gitorious.org:statusnet/mainline into 0.9.x
[quix0rs-gnu-social.git] / actions / rsd.php
index f88bf2e9a8bbfaedd7d33a0748bb0a880ac895d8..0a70117498d7a1b9bd4792fae7db39f06cd130d1 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,7 +85,6 @@ class RsdAction extends Action
      *
      * @return boolean success flag
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -132,7 +129,6 @@ class RsdAction extends Action
      *
      * @return nothing
      */
-
     function handle($args)
     {
         header('Content-Type: application/rsd+xml');
@@ -162,6 +158,20 @@ class RsdAction extends Action
                            'true');
             $this->elementEnd('settings');
             $this->elementEnd('api');
+
+            // Atom API
+
+            if (empty($this->user)) {
+                $service = common_local_url('ApiAtomService');
+            } else {
+                $service = common_local_url('ApiAtomService', array('id' => $this->user->nickname));
+            }
+
+            $this->element('api', array('name' => 'Atom',
+                                        'preferred' => 'false',
+                                        'apiLink' => $service,
+                                        'blogID' => $blogID));
+
             Event::handle('EndRsdListApis', array($this, $this->user));
         }
         $this->elementEnd('apis');
@@ -181,7 +191,6 @@ class RsdAction extends Action
      *
      * @return string date of last change of this page
      */
-
     function lastModified()
     {
         if (!empty($this->user)) {
@@ -200,7 +209,6 @@ class RsdAction extends Action
      *
      * @return boolean true
      */
-
     function isReadOnly($args)
     {
         return true;
@@ -214,7 +222,6 @@ class RsdAction extends Action
      *
      * @return string API root URI for this site
      */
-
     private function _apiRoot()
     {
         if (common_config('site', 'fancy')) {