summaryrefslogtreecommitdiff
path: root/actions/favorited.php
diff options
context:
space:
mode:
authorRobin Millette <millette@controlyourself.ca>2009-04-14 23:03:31 +0000
committerRobin Millette <millette@controlyourself.ca>2009-04-14 23:03:31 +0000
commit533a463879e574f53fb84dd977e9d72a75023451 (patch)
treeac6caa220b15d50664beab5507e1a56b030839f2 /actions/favorited.php
parent20394664957a202cc86cc48ee2d115032e82c58a (diff)
parent9f2e2e4b2c1b428a1892c57c7194fbc5ede5b125 (diff)
Merge branch '0.7.x' of git@gitorious.org:laconica/dev into 0.7.x
Diffstat (limited to 'actions/favorited.php')
-rw-r--r--actions/favorited.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/actions/favorited.php b/actions/favorited.php
index 27da25435..09ab1216a 100644
--- a/actions/favorited.php
+++ b/actions/favorited.php
@@ -104,9 +104,9 @@ class FavoritedAction extends Action
{
parent::prepare($args);
$this->page = ($this->arg('page')) ? ($this->arg('page')+0) : 1;
-
+
common_set_returnto($this->selfUrl());
-
+
return true;
}
@@ -143,13 +143,10 @@ class FavoritedAction extends Action
$this->elementStart('div', 'instructions');
$this->raw($output);
$this->elementEnd('div');
+ }
- $favorite = new Fave;
-
- if ($favorite->count()) {
- return;
- }
-
+ function showEmptyList()
+ {
$message = _('Favorite notices appear on this page but no one has favorited one yet.') . ' ';
if (common_logged_in()) {
@@ -217,6 +214,10 @@ class FavoritedAction extends Action
$cnt = $nl->show();
+ if ($cnt == 0) {
+ $this->showEmptyList();
+ }
+
$this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
$this->page, 'favorited');
}