var $page = null;
- function isReadOnly()
+ function isReadOnly($args)
{
return true;
}
$nav->show();
}
- function showPageNotice()
+ function showEmptyList()
{
- $notice = Notice::publicStream(0, 1);
-
- if (!$notice) {
- $this->serverError(_('Could not retrieve public stream.'));
- return;
- }
-
- // no notices in the public stream, let's get out of here
- 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!');
$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');
}
$cnt = $nl->show();
+ if ($cnt == 0) {
+ $this->showEmptyList();
+ }
+
$this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
$this->page, 'public');
}