]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/apitimelineuser.php
Merge branch 'atompub' into 0.9.x
[quix0rs-gnu-social.git] / actions / apitimelineuser.php
index 7e76636460ad54b8761f37b4946eafcff7c65381..e4a8b596ee7d6491a817f7f2b826af420d719aa6 100644 (file)
@@ -57,10 +57,8 @@ require_once INSTALLDIR . '/lib/apibareauth.php';
  * @license  http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
  * @link     http://status.net/
  */
-
 class ApiTimelineUserAction extends ApiBareAuthAction
 {
-
     var $notices = null;
 
     /**
@@ -69,9 +67,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
      * @param array $args $_REQUEST args
      *
      * @return boolean success flag
-     *
      */
-
     function prepare($args)
     {
         parent::prepare($args);
@@ -79,6 +75,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
         $this->user = $this->getTargetUser($this->arg('id'));
 
         if (empty($this->user)) {
+            // TRANS: Client error displayed requesting most recent notices for a non-existing user.
             $this->clientError(_('No such user.'), 404, $this->format);
             return;
         }
@@ -97,7 +94,6 @@ class ApiTimelineUserAction extends ApiBareAuthAction
      *
      * @return void
      */
-
     function handle($args)
     {
         parent::handle($args);
@@ -114,7 +110,6 @@ class ApiTimelineUserAction extends ApiBareAuthAction
      *
      * @return void
      */
-
     function showTimeline()
     {
         $profile = $this->user->getProfile();
@@ -152,7 +147,6 @@ class ApiTimelineUserAction extends ApiBareAuthAction
                                    );
             break;
         case 'atom':
-
             header('Content-Type: application/atom+xml; charset=utf-8');
 
             $atom->setId($self);
@@ -208,10 +202,10 @@ class ApiTimelineUserAction extends ApiBareAuthAction
             $this->showJsonTimeline($this->notices);
             break;
         default:
+            // TRANS: Client error displayed when trying to handle an unknown API method.
             $this->clientError(_('API method not found.'), $code = 404);
             break;
         }
-
     }
 
     /**
@@ -219,7 +213,6 @@ class ApiTimelineUserAction extends ApiBareAuthAction
      *
      * @return array notices
      */
-
     function getNotices()
     {
         $notices = array();
@@ -248,7 +241,6 @@ class ApiTimelineUserAction extends ApiBareAuthAction
      *
      * @return boolean true
      */
-
     function isReadOnly($args)
     {
         return true;
@@ -259,7 +251,6 @@ class ApiTimelineUserAction extends ApiBareAuthAction
      *
      * @return string datestamp of the latest notice in the stream
      */
-
     function lastModified()
     {
         if (!empty($this->notices) && (count($this->notices) > 0)) {
@@ -277,11 +268,9 @@ class ApiTimelineUserAction extends ApiBareAuthAction
      *
      * @return string etag
      */
-
     function etag()
     {
         if (!empty($this->notices) && (count($this->notices) > 0)) {
-
             $last = count($this->notices) - 1;
 
             return '"' . implode(