]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/repliesrss.php
Fixed routing for direct messages and favorites in the API
[quix0rs-gnu-social.git] / actions / repliesrss.php
index 3689ea1f8ffd95cc19d4c7f61f8804dbe9283ca1..985318bf168794943b1d1cc5216b21279d502f23 100644 (file)
@@ -23,23 +23,27 @@ require_once(INSTALLDIR.'/lib/rssaction.php');
 
 // Formatting of RSS handled by Rss10Action
 
-class RepliesrssAction extends Rss10Action {
+class RepliesrssAction extends Rss10Action
+{
 
-    var $user = NULL;
+    var $user = null;
 
-    function init() {
+    function prepare($args)
+    {
+        parent::prepare($args);
         $nickname = $this->trimmed('nickname');
         $this->user = User::staticGet('nickname', $nickname);
 
         if (!$this->user) {
-            common_user_error(_('No such user.'));
+            $this->clientError(_('No such user.'));
             return false;
         } else {
             return true;
         }
     }
 
-    function get_notices($limit=0) {
+    function getNotices($limit=0)
+    {
 
         $user = $this->user;
 
@@ -54,7 +58,8 @@ class RepliesrssAction extends Rss10Action {
         return $notices;
     }
 
-    function get_channel() {
+    function getChannel()
+    {
         $user = $this->user;
         $c = array('url' => common_local_url('repliesrss',
                                              array('nickname' =>
@@ -67,13 +72,19 @@ class RepliesrssAction extends Rss10Action {
         return $c;
     }
 
-    function get_image() {
+    function getImage()
+    {
         $user = $this->user;
         $profile = $user->getProfile();
         if (!$profile) {
-            return NULL;
+            return null;
         }
         $avatar = $profile->getAvatar(AVATAR_PROFILE_SIZE);
-        return ($avatar) ? $avatar->url : NULL;
+        return ($avatar) ? $avatar->url : null;
     }
-}
\ No newline at end of file
+
+    function isReadOnly()
+    {
+        return true;
+    }
+}