X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fshowfavorites.php;h=77b73711d26af8586d1c1e00e844424661ff45cd;hb=3593f3f1323bfce289bc9805629f7d126dac7ae6;hp=5b85de6835d704c610a0dfc0e20b24f606569da7;hpb=b218aee94e581230e1efa14d4ae1a19756986ddf;p=quix0rs-gnu-social.git diff --git a/actions/showfavorites.php b/actions/showfavorites.php index 5b85de6835..77b73711d2 100644 --- a/actions/showfavorites.php +++ b/actions/showfavorites.php @@ -119,13 +119,13 @@ class ShowfavoritesAction extends OwnerDesignAction if (!empty($cur) && $cur->id == $this->user->id) { // Show imported/gateway notices as well as local if - // the user is looking at his own favorites + // the user is looking at their own favorites - $this->notice = $this->user->favoriteNotices(($this->page-1)*NOTICES_PER_PAGE, - NOTICES_PER_PAGE + 1, true); + $this->notice = $this->user->favoriteNotices(true, ($this->page-1)*NOTICES_PER_PAGE, + NOTICES_PER_PAGE + 1); } else { - $this->notice = $this->user->favoriteNotices(($this->page-1)*NOTICES_PER_PAGE, - NOTICES_PER_PAGE + 1, false); + $this->notice = $this->user->favoriteNotices(false, ($this->page-1)*NOTICES_PER_PAGE, + NOTICES_PER_PAGE + 1); } if (empty($this->notice)) { @@ -135,7 +135,7 @@ class ShowfavoritesAction extends OwnerDesignAction if($this->page > 1 && $this->notice->N == 0){ // TRANS: Server error when page not found (404) - $this->serverError(_('No such page'),$code=404); + $this->serverError(_('No such page.'),$code=404); } return true; @@ -205,11 +205,11 @@ class ShowfavoritesAction extends OwnerDesignAction if ($this->user->id === $current_user->id) { $message = _('You haven\'t chosen any favorite notices yet. Click the fave button on notices you like to bookmark them for later or shed a spotlight on them.'); } else { - $message = sprintf(_('%s hasn\'t added any notices to his favorites yet. Post something interesting they would add to their favorites :)'), $this->user->nickname); + $message = sprintf(_('%s hasn\'t added any favorite notices yet. Post something interesting they would add to their favorites :)'), $this->user->nickname); } } else { - $message = sprintf(_('%s hasn\'t added any notices to his favorites yet. Why not [register an account](%%%%action.register%%%%) and then post something interesting they would add to their favorites :)'), $this->user->nickname); + $message = sprintf(_('%s hasn\'t added any favorite notices yet. Why not [register an account](%%%%action.register%%%%) and then post something interesting they would add to their favorites :)'), $this->user->nickname); } $this->elementStart('div', 'guide'); @@ -227,7 +227,7 @@ class ShowfavoritesAction extends OwnerDesignAction function showContent() { - $nl = new NoticeList($this->notice, $this); + $nl = new FavoritesNoticeList($this->notice, $this); $cnt = $nl->show(); if (0 == $cnt) { @@ -244,3 +244,15 @@ class ShowfavoritesAction extends OwnerDesignAction } } +class FavoritesNoticeList extends NoticeList +{ + function newListItem($notice) + { + return new FavoritesNoticeListItem($notice, $this->out); + } +} + +// All handled by superclass +class FavoritesNoticeListItem extends DoFollowListItem +{ +}