summaryrefslogtreecommitdiff
path: root/actions/all.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-08-14 13:05:29 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-08-14 13:05:29 -0700
commit1b204fde39271acd38bb8f9dd16734f15c68138a (patch)
tree946f756cde56cee6d0fe8e131c863639a8ad6113 /actions/all.php
parent2cf50ea432eab61e8cc2b007d486d0de3cd5aecf (diff)
Revert "Return a 404 when a page is request that has no notices"
An empty list still exists; we shouldn't return a 404. This reverts commit c29892c87573e0575b9a4a13210c562e08411148.
Diffstat (limited to 'actions/all.php')
-rw-r--r--actions/all.php30
1 files changed, 9 insertions, 21 deletions
diff --git a/actions/all.php b/actions/all.php
index 38aee65b6..5db09a0e6 100644
--- a/actions/all.php
+++ b/actions/all.php
@@ -25,31 +25,11 @@ require_once INSTALLDIR.'/lib/feedlist.php';
class AllAction extends ProfileAction
{
- var $notice;
-
function isReadOnly($args)
{
return true;
}
- function prepare($args)
- {
- parent::prepare($args);
- $cur = common_current_user();
-
- if (!empty($cur) && $cur->id == $this->user->id) {
- $this->notice = $this->user->noticeInbox(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
- } else {
- $this->notice = $this->user->noticesWithFriends(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
- }
-
- if($this->page > 1 && $this->notice->N == 0){
- $this->serverError(_('No such page'),$code=404);
- }
-
- return true;
- }
-
function handle($args)
{
parent::handle($args);
@@ -120,7 +100,15 @@ class AllAction extends ProfileAction
function showContent()
{
- $nl = new NoticeList($this->notice, $this);
+ $cur = common_current_user();
+
+ if (!empty($cur) && $cur->id == $this->user->id) {
+ $notice = $this->user->noticeInbox(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
+ } else {
+ $notice = $this->user->noticesWithFriends(($this->page-1)*NOTICES_PER_PAGE, NOTICES_PER_PAGE + 1);
+ }
+
+ $nl = new NoticeList($notice, $this);
$cnt = $nl->show();