summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/favorited.php19
-rw-r--r--actions/public.php3
-rw-r--r--actions/publictagcloud.php2
3 files changed, 21 insertions, 3 deletions
diff --git a/actions/favorited.php b/actions/favorited.php
index 231b97897..20a354674 100644
--- a/actions/favorited.php
+++ b/actions/favorited.php
@@ -143,6 +143,25 @@ 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.') . ' ';
+
+ 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.');
+ }
+ else {
+ $message .= _('Why not [register an account](%%action.register%%) and be the first to add a notice to your favorites!');
+ }
+
+ $this->elementStart('div', 'blankfiller');
+ $this->raw(common_markup_to_html($message));
+ $this->elementEnd('div');
}
/**
diff --git a/actions/public.php b/actions/public.php
index fca90488f..5a2720a9a 100644
--- a/actions/public.php
+++ b/actions/public.php
@@ -168,14 +168,13 @@ class PublicAction extends Action
function showPageNotice()
{
- $notice = Notice::publicStream(0, 1);
+ $notice = new Notice;
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;
}
diff --git a/actions/publictagcloud.php b/actions/publictagcloud.php
index 5322372b2..5bc7e0cbf 100644
--- a/actions/publictagcloud.php
+++ b/actions/publictagcloud.php
@@ -63,7 +63,7 @@ class PublictagcloudAction extends Action
sprintf(_('These are most popular recent tags on %s '),
common_config('site', 'name')));
- $tags = new Notice_tag();
+ $tags = new Notice_tag;
if ($tags->count()) {
return;
}