]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/favorited.php
Merge branch '0.8.x' of git@gitorious.org:+laconica-developers/laconica/dev into...
[quix0rs-gnu-social.git] / actions / favorited.php
index 27da25435b7921c8dc3972cfa88382838a475a12..c902d80f5387e2e5c4f9f50a770864380c9cbd94 100644 (file)
@@ -85,7 +85,7 @@ class FavoritedAction extends Action
      * @return boolean true
      */
 
-    function isReadOnly()
+    function isReadOnly($args)
     {
         return true;
     }
@@ -104,9 +104,9 @@ class FavoritedAction extends Action
     {
         parent::prepare($args);
         $this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
-        
+
         common_set_returnto($this->selfUrl());
-        
+
         return true;
     }
 
@@ -143,13 +143,10 @@ class FavoritedAction extends Action
         $this->elementStart('div', 'instructions');
         $this->raw($output);
         $this->elementEnd('div');
+    }
 
-        $favorite = new Fave;
-
-        if ($favorite->count()) {
-            return;
-        }
-
+    function showEmptyList()
+    {
         $message = _('Favorite notices appear on this page but no one has favorited one yet.') . ' ';
 
         if (common_logged_in()) {
@@ -217,6 +214,10 @@ class FavoritedAction extends Action
 
         $cnt = $nl->show();
 
+        if ($cnt == 0) {
+            $this->showEmptyList();
+        }
+
         $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
                           $this->page, 'favorited');
     }