From f3db32d1519dc7c5c7c56e7307e7aad5e0bb2a74 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 26 Jan 2009 15:45:54 +0100 Subject: [PATCH] Fix direct addressing of messages --- actions/newmessage.php | 2 +- lib/messageform.php | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/actions/newmessage.php b/actions/newmessage.php index 38e70c90d1..f83015a372 100644 --- a/actions/newmessage.php +++ b/actions/newmessage.php @@ -201,7 +201,7 @@ class NewmessageAction extends Action function showNoticeForm() { - $message_form = new MessageForm($this); + $message_form = new MessageForm($this, $this->to, $this->content); $message_form->show(); } } diff --git a/lib/messageform.php b/lib/messageform.php index 61d3d75af2..f415083057 100644 --- a/lib/messageform.php +++ b/lib/messageform.php @@ -99,7 +99,6 @@ class MessageForm extends Form return common_local_url('newmessage'); } - /** * Legend of the Form * @@ -110,7 +109,6 @@ class MessageForm extends Form $this->out->element('legend', null, _('Send a direct notice')); } - /** * Data elements * @@ -137,7 +135,7 @@ class MessageForm extends Form $this->out->elementStart('ul', 'form_data'); $this->out->elementStart('li', array('id' => 'notice_to')); $this->out->dropdown('to', _('To'), $mutual, null, false, - $this->to->id); + ($this->to) ? $this->to->id : null); $this->out->elementEnd('li'); $this->out->elementStart('li', array('id' => 'notice_text')); -- 2.39.5