]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Fix direct addressing of messages
authorEvan Prodromou <evan@controlyourself.ca>
Mon, 26 Jan 2009 14:45:54 +0000 (15:45 +0100)
committerEvan Prodromou <evan@controlyourself.ca>
Mon, 26 Jan 2009 14:45:54 +0000 (15:45 +0100)
actions/newmessage.php
lib/messageform.php

index 38e70c90d195c6280b599a81ce6af00403c3e43e..f83015a372ce764502cf457e120b9d75c0229c90 100644 (file)
@@ -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();
     }
 }
index 61d3d75af26face5c970bb7e0d78b73d3f847567..f41508305773628b64350284c090c003319fcb58 100644 (file)
@@ -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'));