]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apitimelinetag.php
Better token revocation
[quix0rs-gnu-social.git] / actions / apitimelinetag.php
index a274daac00bdfc7507ae83aeab08345b0333ea76..1427d23b6a45d70e0f93f26292f11d25b8c4f1d1 100644 (file)
@@ -34,7 +34,7 @@ if (!defined('STATUSNET')) {
     exit(1);
 }
 
-require_once INSTALLDIR . '/lib/api.php';
+require_once INSTALLDIR . '/lib/apiprivateauth.php';
 
 /**
  * Returns the 20 most recent notices tagged by a given tag
@@ -49,7 +49,7 @@ require_once INSTALLDIR . '/lib/api.php';
  * @link     http://status.net/
  */
 
-class ApiTimelineTagAction extends ApiAction
+class ApiTimelineTagAction extends ApiPrivateAuthAction
 {
 
     var $notices = null;
@@ -98,6 +98,7 @@ class ApiTimelineTagAction extends ApiAction
     function showTimeline()
     {
         $sitename   = common_config('site', 'name');
+        $sitelogo   = (common_config('site', 'logo')) ? common_config('site', 'logo') : Theme::path('logo.png');
         $title      = sprintf(_("Notices tagged with %s"), $this->tag);
         $link       = common_local_url(
             'tag',
@@ -116,7 +117,7 @@ class ApiTimelineTagAction extends ApiAction
             $this->showXmlTimeline($this->notices);
             break;
         case 'rss':
-            $this->showRssTimeline($this->notices, $title, $link, $subtitle);
+            $this->showRssTimeline($this->notices, $title, $link, $subtitle, null, $sitelogo);
             break;
         case 'atom':
             $selfuri = common_root_url() .
@@ -129,14 +130,15 @@ class ApiTimelineTagAction extends ApiAction
                 $link,
                 $subtitle,
                 null,
-                $selfuri
+                $selfuri,
+                $sitelogo
             );
             break;
         case 'json':
             $this->showJsonTimeline($this->notices);
             break;
         default:
-            $this->clientError(_('API method not found!'), $code = 404);
+            $this->clientError(_('API method not found.'), $code = 404);
             break;
         }
     }