From fc22bde67cd9a92ffb27bd8ce9258035fb25e582 Mon Sep 17 00:00:00 2001 From: Craig Andrews Date: Fri, 30 Oct 2009 16:01:20 -0400 Subject: Redirect to login when trying to send a direct message while not logged in. http://status.net/trac/ticket/1359 --- actions/newmessage.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'actions') diff --git a/actions/newmessage.php b/actions/newmessage.php index a0b17fc18..eac4ab210 100644 --- a/actions/newmessage.php +++ b/actions/newmessage.php @@ -99,7 +99,9 @@ class NewmessageAction extends Action $user = common_current_user(); if (!$user) { - $this->clientError(_('Only logged-in users can send direct messages.'), 403); + /* Go log in, and then come back. */ + common_set_returnto($_SERVER['REQUEST_URI']); + common_redirect(common_local_url('login')); return false; } -- cgit v1.2.3-54-g00ecf From b7ed31c27bc883b7b7b6a9af6391aacd8d897d78 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 30 Oct 2009 16:53:23 -0400 Subject: Use nickname from profile, not user object, to avoid barfing warnings on Twitter messages imported into the timeline. --- actions/shownotice.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actions') diff --git a/actions/shownotice.php b/actions/shownotice.php index 41408c23c..5d16fdad9 100644 --- a/actions/shownotice.php +++ b/actions/shownotice.php @@ -172,9 +172,9 @@ class ShownoticeAction extends OwnerDesignAction function title() { if (!empty($this->profile->fullname)) { - $base = $this->profile->fullname . ' (' . $this->user->nickname . ') '; + $base = $this->profile->fullname . ' (' . $this->profile->nickname . ') '; } else { - $base = $this->user->nickname; + $base = $this->profile->nickname; } return sprintf(_('%1$s\'s status on %2$s'), -- cgit v1.2.3-54-g00ecf