X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fpublic.php;h=5a380de9a8bb984ddf03b579febb03e348c6c147;hb=fc6cedd2227d9d560736e494f431e2b40b26b45c;hp=5a2720a9ad919cdbb8442e3832c1c470908d5be2;hpb=e1fec6db2fdc9c28878c8f87bd5b55d1b1e5e1fa;p=quix0rs-gnu-social.git diff --git a/actions/public.php b/actions/public.php index 5a2720a9ad..5a380de9a8 100644 --- a/actions/public.php +++ b/actions/public.php @@ -166,20 +166,9 @@ class PublicAction extends Action $nav->show(); } - function showPageNotice() + function showEmptyList() { - $notice = new Notice; - - if (!$notice) { - $this->serverError(_('Could not retrieve public stream.')); - return; - } - - if ($notice->count()) { - return; - } - - $message = _('This is the public timeline for %%site.name%% but noone has posted anything yet.') . ' '; + $message = _('This is the public timeline for %%site.name%% but no one has posted anything yet.') . ' '; if (common_logged_in()) { $message .= _('Be the first to post!'); @@ -188,7 +177,7 @@ class PublicAction extends Action $message .= _('Why not [register an account](%%action.register%%) and be the first to post!'); } - $this->elementStart('div', 'blankfiller'); + $this->elementStart('div', 'guide'); $this->raw(common_markup_to_html($message)); $this->elementEnd('div'); } @@ -216,6 +205,10 @@ class PublicAction extends Action $cnt = $nl->show(); + if ($cnt == 0) { + $this->showEmptyList(); + } + $this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE, $this->page, 'public'); }