summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/all.php11
-rw-r--r--actions/api.php4
-rw-r--r--actions/block.php2
-rw-r--r--actions/favorited.php11
-rw-r--r--actions/groupmembers.php11
-rw-r--r--actions/groups.php11
-rw-r--r--actions/inbox.php21
-rw-r--r--actions/outbox.php13
-rw-r--r--actions/public.php11
-rw-r--r--actions/replies.php11
-rw-r--r--actions/showfavorites.php12
-rw-r--r--actions/showgroup.php11
-rw-r--r--actions/shownotice.php2
-rw-r--r--actions/showstream.php19
-rw-r--r--actions/tag.php12
-rw-r--r--actions/unblock.php2
16 files changed, 17 insertions, 147 deletions
diff --git a/actions/all.php b/actions/all.php
index a53bbea07..03179a246 100644
--- a/actions/all.php
+++ b/actions/all.php
@@ -69,17 +69,6 @@ class AllAction extends ProfileAction
sprintf(_('Feed for friends of %s (Atom)'), $this->user->nickname)));
}
- /**
- * Output document relationship links
- *
- * @return void
- */
- function showRelationshipLinks()
- {
- $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
- $this->page, 'all', array('nickname' => $this->user->nickname));
- }
-
function showLocalNav()
{
$nav = new PersonalGroupNav($this);
diff --git a/actions/api.php b/actions/api.php
index b25ba99f3..b8da852b5 100644
--- a/actions/api.php
+++ b/actions/api.php
@@ -144,8 +144,8 @@ class ApiAction extends Action
}
if (in_array($fullname, $bareauth)) {
- # bareauth: only needs auth if without an argument
- if ($this->api_arg) {
+ # bareauth: only needs auth if without an argument or query param specifying user
+ if ($this->api_arg || $this->arg('id') || is_numeric($this->arg('user_id')) || $this->arg('screen_name')) {
return false;
} else {
return true;
diff --git a/actions/block.php b/actions/block.php
index 34f991dc6..0efee5932 100644
--- a/actions/block.php
+++ b/actions/block.php
@@ -180,7 +180,7 @@ class BlockAction extends Action
if ($action) {
common_redirect(common_local_url($action, $args), 303);
} else {
- common_redirect(common_local_url('subscriptions',
+ common_redirect(common_local_url('subscribers',
array('nickname' => $cur->nickname)),
303);
}
diff --git a/actions/favorited.php b/actions/favorited.php
index 7e31303e3..c902d80f5 100644
--- a/actions/favorited.php
+++ b/actions/favorited.php
@@ -221,15 +221,4 @@ class FavoritedAction extends Action
$this->pagination($this->page > 1, $cnt > NOTICES_PER_PAGE,
$this->page, 'favorited');
}
-
- /**
- * Output document relationship links
- *
- * @return void
- */
- function showRelationshipLinks()
- {
- $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
- $this->page, 'favorited');
- }
}
diff --git a/actions/groupmembers.php b/actions/groupmembers.php
index 909935bec..21e5ebbaa 100644
--- a/actions/groupmembers.php
+++ b/actions/groupmembers.php
@@ -137,15 +137,4 @@ class GroupmembersAction extends Action
$this->page, 'groupmembers',
array('nickname' => $this->group->nickname));
}
-
- /**
- * Output document relationship links
- *
- * @return void
- */
- function showRelationshipLinks()
- {
- $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
- $this->page, 'groupmembers', array('nickname' => $this->group->nickname));
- }
}
diff --git a/actions/groups.php b/actions/groups.php
index e20acce70..26b52a5fc 100644
--- a/actions/groups.php
+++ b/actions/groups.php
@@ -129,15 +129,4 @@ class GroupsAction extends Action
$gbm = new GroupsByMembersSection($this);
$gbm->show();
}
-
- /**
- * Output document relationship links
- *
- * @return void
- */
- function showRelationshipLinks()
- {
- $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
- $this->page, 'groups', array('nickname' => $this->group->nickname));
- }
}
diff --git a/actions/inbox.php b/actions/inbox.php
index 7b5cf2d20..f14ba631f 100644
--- a/actions/inbox.php
+++ b/actions/inbox.php
@@ -46,15 +46,15 @@ require_once INSTALLDIR.'/lib/mailbox.php';
class InboxAction extends MailboxAction
{
-
+
/**
* Title of the page
*
* @return string page title
*/
-
+
function title()
- {
+ {
if ($this->page > 1) {
return sprintf(_("Inbox for %s - page %d"), $this->user->nickname,
$this->page);
@@ -64,21 +64,10 @@ class InboxAction extends MailboxAction
}
/**
- * Output document relationship links
- *
- * @return void
- */
- function showRelationshipLinks()
- {
- $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
- $this->page, 'inbox', array('nickname' => $this->user->nickname));
- }
-
- /**
* Retrieve the messages for this user and this page
*
* Does a query for the right messages
- *
+ *
* @return Message data object with stream for messages
*
* @see MailboxAction::getMessages()
@@ -95,7 +84,7 @@ class InboxAction extends MailboxAction
if ($message->find()) {
return $message;
- } else {
+ } else {
return null;
}
}
diff --git a/actions/outbox.php b/actions/outbox.php
index deef1cc87..a875e9ad9 100644
--- a/actions/outbox.php
+++ b/actions/outbox.php
@@ -63,21 +63,10 @@ class OutboxAction extends MailboxAction
}
/**
- * Output document relationship links
- *
- * @return void
- */
- function showRelationshipLinks()
- {
- $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
- $this->page, 'outbox', array('nickname' => $this->user->nickname));
- }
-
- /**
* retrieve the messages for this user and this page
*
* Does a query for the right messages
- *
+ *
* @return Message data object with stream for messages
*
* @see MailboxAction::getMessages()
diff --git a/actions/public.php b/actions/public.php
index d2f9da646..27153f131 100644
--- a/actions/public.php
+++ b/actions/public.php
@@ -136,17 +136,6 @@ class PublicAction extends Action
}
/**
- * Output document relationship links
- *
- * @return void
- */
- function showRelationshipLinks()
- {
- $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
- $this->page, 'public');
- }
-
- /**
* Extra head elements
*
* We include a <meta> element linking to the publicxrds page, for OpenID
diff --git a/actions/replies.php b/actions/replies.php
index dfb520d64..eac4d0a3a 100644
--- a/actions/replies.php
+++ b/actions/replies.php
@@ -139,17 +139,6 @@ class RepliesAction extends Action
}
/**
- * Output document relationship links
- *
- * @return void
- */
- function showRelationshipLinks()
- {
- $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
- $this->page, 'replies', array('nickname' => $this->user->nickname));
- }
-
- /**
* show the personal group nav
*
* @return void
diff --git a/actions/showfavorites.php b/actions/showfavorites.php
index eed62a2ab..865045337 100644
--- a/actions/showfavorites.php
+++ b/actions/showfavorites.php
@@ -151,18 +151,6 @@ class ShowfavoritesAction extends Action
}
/**
- * Output document relationship links
- *
- * @return void
- */
- function showRelationshipLinks()
- {
- $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
- $this->page, 'showfavorites', array('nickname' => $this->user->nickname));
- }
-
-
- /**
* show the personal group nav
*
* @return void
diff --git a/actions/showgroup.php b/actions/showgroup.php
index a7df39727..29b6fa1e6 100644
--- a/actions/showgroup.php
+++ b/actions/showgroup.php
@@ -312,17 +312,6 @@ class ShowgroupAction extends Action
}
/**
- * Output document relationship links
- *
- * @return void
- */
- function showRelationshipLinks()
- {
- $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
- $this->page, 'showgroup', array('nickname' => $this->group->nickname));
- }
-
- /**
* Fill in the sidebar.
*
* @return void
diff --git a/actions/shownotice.php b/actions/shownotice.php
index 2c469c9de..1be1e2414 100644
--- a/actions/shownotice.php
+++ b/actions/shownotice.php
@@ -122,7 +122,7 @@ class ShownoticeAction extends Action
function lastModified()
{
- return max(strtotime($this->notice->created),
+ return max(strtotime($this->notice->modified),
strtotime($this->profile->modified),
($this->avatar) ? strtotime($this->avatar->modified) : 0);
}
diff --git a/actions/showstream.php b/actions/showstream.php
index 82665e5b8..641228bc7 100644
--- a/actions/showstream.php
+++ b/actions/showstream.php
@@ -135,17 +135,6 @@ class ShowstreamAction extends ProfileAction
sprintf(_('FOAF for %s'), $this->user->nickname)));
}
- /**
- * Output document relationship links
- *
- * @return void
- */
- function showRelationshipLinks()
- {
- $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
- $this->page, 'showstream', array('nickname' => $this->user->nickname));
- }
-
function extraHead()
{
// for remote subscriptions etc.
@@ -319,10 +308,14 @@ class ShowstreamAction extends ProfileAction
$blocked = $cur->hasBlocked($this->profile);
$this->elementStart('li', 'entity_block');
if ($blocked) {
- $ubf = new UnblockForm($this, $this->profile);
+ $ubf = new UnblockForm($this, $this->profile,
+ array('action' => 'showstream',
+ 'nickname' => $this->profile->nickname));
$ubf->show();
} else {
- $bf = new BlockForm($this, $this->profile);
+ $bf = new BlockForm($this, $this->profile,
+ array('action' => 'showstream',
+ 'nickname' => $this->profile->nickname));
$bf->show();
}
$this->elementEnd('li');
diff --git a/actions/tag.php b/actions/tag.php
index 02f3e3522..f5ca06f05 100644
--- a/actions/tag.php
+++ b/actions/tag.php
@@ -51,7 +51,6 @@ class TagAction extends Action
$pop->show();
}
-
function title()
{
if ($this->page == 1) {
@@ -77,17 +76,6 @@ class TagAction extends Action
sprintf(_('Feed for tag %s'), $this->tag)));
}
- /**
- * Output document relationship links
- *
- * @return void
- */
- function showRelationshipLinks()
- {
- $this->sequenceRelationships($this->page > 1, $this->count > NOTICES_PER_PAGE, // FIXME
- $this->page, 'tag', array('tag' => $this->tag));
- }
-
function showPageNotice()
{
return sprintf(_('Messages tagged "%s", most recent first'), $this->tag);
diff --git a/actions/unblock.php b/actions/unblock.php
index 8573b2a87..6e671c9dd 100644
--- a/actions/unblock.php
+++ b/actions/unblock.php
@@ -118,7 +118,7 @@ class UnblockAction extends Action
if ($action) {
common_redirect(common_local_url($action, $args), 303);
} else {
- common_redirect(common_local_url('subscriptions',
+ common_redirect(common_local_url('subscribers',
array('nickname' => $cur->nickname)),
303);
}