X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fpublic.php;h=0b3b5fde846fd23b2cbb4aedcce78e25f71363a8;hb=4b80ce0be89fe50eabec1a19dbf4a0c26a413423;hp=15bedb7119b6f24cde6b29f8a9e2bb3d85bd69d3;hpb=3e362233ee2f7acd676c0ee86025d7511f265b7e;p=quix0rs-gnu-social.git diff --git a/actions/public.php b/actions/public.php index 15bedb7119..0b3b5fde84 100644 --- a/actions/public.php +++ b/actions/public.php @@ -1,6 +1,6 @@ . * * @category Public - * @package Laconica - * @author Evan Prodromou - * @copyright 2008-2009 Control Yourself, Inc. + * @package StatusNet + * @author Evan Prodromou + * @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 + * @package StatusNet + * @author Evan Prodromou * @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 @@ -94,6 +94,7 @@ class PublicAction extends Action } if($this->page > 1 && $this->notice->N == 0){ + // TRANS: Server error when page not found (404) $this->serverError(_('No such page'),$code=404); } @@ -132,6 +133,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 elements for RSS and Atom feeds * @@ -143,14 +159,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)'))); } @@ -225,12 +239,13 @@ class PublicAction extends Action function showAnonymousMessage() { if (! (common_config('site','closed') || common_config('site','inviteonly'))) { - $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. ' . - '[Join now](%%action.register%%) to share notices about yourself with friends, family, and colleagues! ([Read more](%%doc.help%%))'); + $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));