summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-04-03 14:22:10 -0700
committerZach Copley <zach@controlyourself.ca>2009-04-03 14:22:10 -0700
commit123f6d7d0cfa707e7a5167257978a46aaa7d2938 (patch)
treef2c079a38806efc6222988b45d756dbca79d126e
parentd83f6c32690b34a4aa283f8665c9fa2c4f7df185 (diff)
parent8f969f8f9834869dd8546ed5e4cca0262aff2ca9 (diff)
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
-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;
}