]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/public.php
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
[quix0rs-gnu-social.git] / actions / public.php
index b68b2ff793dc99d44ca606508a4b5c3e71481b1f..50278bfcedab55a80c9fe2c2ed359ad79399e727 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Laconica, the distributed open-source microblogging tool
+ * StatusNet, the distributed open-source microblogging tool
  *
  * Action for displaying the public stream
  *
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  * @category  Public
- * @package   Laconica
- * @author    Evan Prodromou <evan@controlyourself.ca>
- * @copyright 2008-2009 Control Yourself, Inc.
+ * @package   StatusNet
+ * @author    Evan Prodromou <evan@status.net>
+ * @copyright 2008-2009 StatusNet, Inc.
  * @license   http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link      http://laconi.ca/
+ * @link      http://status.net/
  */
 
-if (!defined('LACONICA')) {
+if (!defined('STATUSNET') && !defined('LACONICA')) {
     exit(1);
 }
 
@@ -43,10 +43,10 @@ define('MAX_PUBLIC_PAGE', 100);
  * Action for displaying the public stream
  *
  * @category Public
- * @package  Laconica
- * @author   Evan Prodromou <evan@controlyourself.ca>
+ * @package  StatusNet
+ * @author   Evan Prodromou <evan@status.net>
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
- * @link     http://laconi.ca/
+ * @link     http://status.net/
  *
  * @see      PublicrssAction
  * @see      PublicxrdsAction
@@ -132,6 +132,21 @@ class PublicAction extends Action
         }
     }
 
+    function extraHead()
+    {
+        parent::extraHead();
+        $this->element('meta', array('http-equiv' => 'X-XRDS-Location',
+                                           'content' => common_local_url('publicxrds')));
+
+        $rsd = common_local_url('rsd');
+
+        // RSD, http://tales.phrasewise.com/rfc/rsd
+
+        $this->element('link', array('rel' => 'EditURI',
+                                     'type' => 'application/rsd+xml',
+                                     'href' => $rsd));
+    }
+
     /**
      * Output <head> elements for RSS and Atom feeds
      *
@@ -143,14 +158,12 @@ class PublicAction extends Action
         return array(new Feed(Feed::RSS1, common_local_url('publicrss'),
                               _('Public Stream Feed (RSS 1.0)')),
                      new Feed(Feed::RSS2,
-                              common_local_url('api',
-                                               array('apiaction' => 'statuses',
-                                                     'method' => 'public_timeline.rss')),
+                              common_local_url('ApiTimelinePublic',
+                                               array('format' => 'rss')),
                               _('Public Stream Feed (RSS 2.0)')),
                      new Feed(Feed::ATOM,
-                              common_local_url('api',
-                                               array('apiaction' => 'statuses',
-                                                     'method' => 'public_timeline.atom')),
+                              common_local_url('ApiTimelinePublic',
+                                               array('format' => 'atom')),
                               _('Public Stream Feed (Atom)')));
     }
 
@@ -178,8 +191,7 @@ class PublicAction extends Action
         }
         else {
             if (! (common_config('site','closed') || common_config('site','inviteonly'))) {
-                $message .= sprintf(_('Why not [register an account](%%%%action.%s%%%%) and be the first to post!'),
-                                    (!common_config('site','openidonly')) ? 'register' : 'openidlogin');
+                $message .= _('Why not [register an account](%%action.register%%) and be the first to post!');
             }
        }
 
@@ -226,14 +238,13 @@ class PublicAction extends Action
     function showAnonymousMessage()
     {
         if (! (common_config('site','closed') || common_config('site','inviteonly'))) {
-            $m = sprintf(_('This is %%%%site.name%%%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
-                           'based on the Free Software [Laconica](http://laconi.ca/) tool. ' .
-                           '[Join now](%%%%action.%s%%%%) to share notices about yourself with friends, family, and colleagues! ' .
-                           '([Read more](%%%%doc.help%%%%))'),
-                         (!common_config('site','openidonly')) ? 'register' : 'openidlogin');
+            $m = _('This is %%site.name%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
+                   'based on the Free Software [StatusNet](http://status.net/) tool. ' .
+                   '[Join now](%%action.register%%) to share notices about yourself with friends, family, and colleagues! ' .
+                   '([Read more](%%doc.help%%))');
         } else {
             $m = _('This is %%site.name%%, a [micro-blogging](http://en.wikipedia.org/wiki/Micro-blogging) service ' .
-                   'based on the Free Software [Laconica](http://laconi.ca/) tool.');
+                   'based on the Free Software [StatusNet](http://status.net/) tool.');
         }
         $this->elementStart('div', array('id' => 'anon_notice'));
         $this->raw(common_markup_to_html($m));