X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Ffavorited.php;h=c902d80f5387e2e5c4f9f50a770864380c9cbd94;hb=b4e649fe906a793cd5e62d6390065ea5d41c40db;hp=20a354674f4185cee36c7d18e7198691e914c442;hpb=96982477220316ee7af0326dc6ff42d2438b540e;p=quix0rs-gnu-social.git diff --git a/actions/favorited.php b/actions/favorited.php index 20a354674f..c902d80f53 100644 --- a/actions/favorited.php +++ b/actions/favorited.php @@ -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,14 +143,11 @@ class FavoritedAction extends Action $this->elementStart('div', 'instructions'); $this->raw($output); $this->elementEnd('div'); + } - $favorite = new Fave; - - if ($favorite->count()) { - return; - } - - $message = _('Favorite notices appear on this page but noone has favorited one yet.') . ' '; + function showEmptyList() + { + $message = _('Favorite notices appear on this page but no one has favorited one yet.') . ' '; if (common_logged_in()) { $message .= _('Be the first to add a notice to your favorites by clicking the fave button next to any notice you like.'); @@ -159,7 +156,7 @@ class FavoritedAction extends Action $message .= _('Why not [register an account](%%action.register%%) and be the first to add a notice to your favorites!'); } - $this->elementStart('div', 'blankfiller'); + $this->elementStart('div', 'guide'); $this->raw(common_markup_to_html($message)); $this->elementEnd('div'); } @@ -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'); }