]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/replies.php
Merge branch 'fixes/private_scope_on_tags' into social-master
[quix0rs-gnu-social.git] / actions / replies.php
index 86042557dc11d2cb1afebc12b14ecb55669365f2..11d9c7c706cc29a777a326fa5b3e96ece2799e56 100644 (file)
@@ -59,18 +59,17 @@ class RepliesAction extends Action
      *
      * @return boolean success flag
      */
-    function prepare($args)
+    function prepare(array $args=array())
     {
         parent::prepare($args);
 
         $nickname = common_canonical_nickname($this->arg('nickname'));
 
-        $this->user = User::staticGet('nickname', $nickname);
+        $this->user = User::getKV('nickname', $nickname);
 
         if (!$this->user) {
             // TRANS: Client error displayed when trying to reply to a non-exsting user.
             $this->clientError(_('No such user.'));
-            return false;
         }
 
         $profile = $this->user->getProfile();
@@ -78,7 +77,6 @@ class RepliesAction extends Action
         if (!$profile) {
             // TRANS: Error message displayed when referring to a user without a profile.
             $this->serverError(_('User has no profile.'));
-            return false;
         }
 
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
@@ -92,8 +90,8 @@ class RepliesAction extends Action
                                             NOTICES_PER_PAGE + 1);
 
         if($this->page > 1 && $this->notice->N == 0){
-            // TRANS: Server error when page not found (404)
-            $this->serverError(_('No such page.'),$code=404);
+            // TRANS: Client error when page not found (404)
+            $this->clientError(_('No such page.'), 404);
         }
 
         return true;
@@ -108,7 +106,7 @@ class RepliesAction extends Action
      *
      * @return void
      */
-    function handle($args)
+    function handle(array $args=array())
     {
         parent::handle($args);
         $this->showPage();
@@ -188,7 +186,7 @@ class RepliesAction extends Action
      */
     function showContent()
     {
-        $nl = new NoticeList($this->notice, $this);
+        $nl = new PrimaryNoticeList($this->notice, $this, array('show_n'=>NOTICES_PER_PAGE));
 
         $cnt = $nl->show();
         if (0 === $cnt) {
@@ -231,7 +229,7 @@ class RepliesAction extends Action
         $this->elementEnd('div');
     }
 
-    function isReadOnly($args)
+    function isReadOnly(array $args=array())
     {
         return true;
     }