summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorZach Copley <zach@status.net>2010-03-03 00:54:35 +0000
committerZach Copley <zach@status.net>2010-03-03 00:54:35 +0000
commit097e3f89b630b7a28f27c96f5e9a036df3ed7710 (patch)
treeb34602a5fcd9cc9474737379ddafde3976c0cb96 /actions
parent6c1321b108206d05b75703da22ea8abab82071bf (diff)
parent08422dfa17a5c52d51f21087be0f1d8d602ed0af (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'actions')
-rw-r--r--actions/all.php22
-rw-r--r--actions/apidirectmessage.php5
-rw-r--r--actions/apigrouplist.php3
-rw-r--r--actions/apigroupmembership.php3
-rw-r--r--actions/apitimelinefriends.php4
-rw-r--r--actions/apitimelinegroup.php3
-rw-r--r--actions/apitimelinehome.php4
-rw-r--r--actions/apitimelinementions.php2
-rw-r--r--actions/apitimelinepublic.php4
-rw-r--r--actions/apitimelineuser.php2
10 files changed, 22 insertions, 30 deletions
diff --git a/actions/all.php b/actions/all.php
index 3eb185214..6be0c00e3 100644
--- a/actions/all.php
+++ b/actions/all.php
@@ -144,18 +144,22 @@ class AllAction extends ProfileAction
function showContent()
{
- $nl = new NoticeList($this->notice, $this);
+ if (Event::handle('StartShowAllContent', array($this))) {
+ $nl = new NoticeList($this->notice, $this);
- $cnt = $nl->show();
+ $cnt = $nl->show();
- if (0 == $cnt) {
- $this->showEmptyListMessage();
- }
+ if (0 == $cnt) {
+ $this->showEmptyListMessage();
+ }
- $this->pagination(
- $this->page > 1, $cnt > NOTICES_PER_PAGE,
- $this->page, 'all', array('nickname' => $this->user->nickname)
- );
+ $this->pagination(
+ $this->page > 1, $cnt > NOTICES_PER_PAGE,
+ $this->page, 'all', array('nickname' => $this->user->nickname)
+ );
+
+ Event::handle('EndShowAllContent', array($this));
+ }
}
function showPageTitle()
diff --git a/actions/apidirectmessage.php b/actions/apidirectmessage.php
index 5355acf82..53da9e0c6 100644
--- a/actions/apidirectmessage.php
+++ b/actions/apidirectmessage.php
@@ -182,11 +182,6 @@ class ApiDirectMessageAction extends ApiAuthAction
$message->whereAdd('id > ' . $this->since_id);
}
- if (!empty($since)) {
- $d = date('Y-m-d H:i:s', $this->since);
- $message->whereAdd("created > '$d'");
- }
-
$message->orderBy('created DESC, id DESC');
$message->limit((($this->page - 1) * $this->count), $this->count);
$message->find();
diff --git a/actions/apigrouplist.php b/actions/apigrouplist.php
index 605b38232..98fdb0497 100644
--- a/actions/apigrouplist.php
+++ b/actions/apigrouplist.php
@@ -152,8 +152,7 @@ class ApiGroupListAction extends ApiBareAuthAction
($this->page - 1) * $this->count,
$this->count,
$this->since_id,
- $this->max_id,
- $this->since
+ $this->max_id
);
while ($group->fetch()) {
diff --git a/actions/apigroupmembership.php b/actions/apigroupmembership.php
index 3c7c8e883..9f72b527c 100644
--- a/actions/apigroupmembership.php
+++ b/actions/apigroupmembership.php
@@ -125,8 +125,7 @@ class ApiGroupMembershipAction extends ApiPrivateAuthAction
($this->page - 1) * $this->count,
$this->count,
$this->since_id,
- $this->max_id,
- $this->since
+ $this->max_id
);
while ($profile->fetch()) {
diff --git a/actions/apitimelinefriends.php b/actions/apitimelinefriends.php
index 2db76857e..9ef3ace60 100644
--- a/actions/apitimelinefriends.php
+++ b/actions/apitimelinefriends.php
@@ -202,11 +202,11 @@ class ApiTimelineFriendsAction extends ApiBareAuthAction
if (!empty($this->auth_user) && $this->auth_user->id == $this->user->id) {
$notice = $this->user->ownFriendsTimeline(($this->page-1) * $this->count,
$this->count, $this->since_id,
- $this->max_id, $this->since);
+ $this->max_id);
} else {
$notice = $this->user->friendsTimeline(($this->page-1) * $this->count,
$this->count, $this->since_id,
- $this->max_id, $this->since);
+ $this->max_id);
}
while ($notice->fetch()) {
diff --git a/actions/apitimelinegroup.php b/actions/apitimelinegroup.php
index 04456ffea..d0af49844 100644
--- a/actions/apitimelinegroup.php
+++ b/actions/apitimelinegroup.php
@@ -204,8 +204,7 @@ class ApiTimelineGroupAction extends ApiPrivateAuthAction
($this->page-1) * $this->count,
$this->count,
$this->since_id,
- $this->max_id,
- $this->since
+ $this->max_id
);
while ($notice->fetch()) {
diff --git a/actions/apitimelinehome.php b/actions/apitimelinehome.php
index 0c72f4020..abd387786 100644
--- a/actions/apitimelinehome.php
+++ b/actions/apitimelinehome.php
@@ -200,13 +200,13 @@ class ApiTimelineHomeAction extends ApiBareAuthAction
$notice = $this->user->noticeInbox(
($this->page-1) * $this->count,
$this->count, $this->since_id,
- $this->max_id, $this->since
+ $this->max_id
);
} else {
$notice = $this->user->noticesWithFriends(
($this->page-1) * $this->count,
$this->count, $this->since_id,
- $this->max_id, $this->since
+ $this->max_id
);
}
diff --git a/actions/apitimelinementions.php b/actions/apitimelinementions.php
index a39c63346..31627ab7b 100644
--- a/actions/apitimelinementions.php
+++ b/actions/apitimelinementions.php
@@ -189,7 +189,7 @@ class ApiTimelineMentionsAction extends ApiBareAuthAction
$notice = $this->user->getReplies(
($this->page - 1) * $this->count, $this->count,
- $this->since_id, $this->max_id, $this->since
+ $this->since_id, $this->max_id
);
while ($notice->fetch()) {
diff --git a/actions/apitimelinepublic.php b/actions/apitimelinepublic.php
index 1ff0fd261..3e4dad690 100644
--- a/actions/apitimelinepublic.php
+++ b/actions/apitimelinepublic.php
@@ -75,10 +75,6 @@ class ApiTimelinePublicAction extends ApiPrivateAuthAction
$this->notices = $this->getNotices();
- if ($this->since) {
- throw new ServerException("since parameter is disabled for performance; use since_id", 403);
- }
-
return true;
}
diff --git a/actions/apitimelineuser.php b/actions/apitimelineuser.php
index b3ded97c0..94491946c 100644
--- a/actions/apitimelineuser.php
+++ b/actions/apitimelineuser.php
@@ -211,7 +211,7 @@ class ApiTimelineUserAction extends ApiBareAuthAction
$notice = $this->user->getNotices(
($this->page-1) * $this->count, $this->count,
- $this->since_id, $this->max_id, $this->since
+ $this->since_id, $this->max_id
);
while ($notice->fetch()) {