summaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2008-09-24 16:41:31 -0400
committerEvan Prodromou <evan@controlyourself.ca>2008-09-24 16:41:31 -0400
commitfc7663e86ab7fd00cace6cfc80dee60b25c83bdc (patch)
tree09fa649213b36f0539205c93d412a1b48951bcd2 /actions
parentffeeec392e2bf2f53b2dea39dc8563a4cd6a084e (diff)
put message form on inbox and outbox
darcs-hash:20080924204131-5ed1f-099c73720b3a4f2263ca28566fcd6b4c809fd4ab.gz
Diffstat (limited to 'actions')
-rw-r--r--actions/newmessage.php37
1 files changed, 1 insertions, 36 deletions
diff --git a/actions/newmessage.php b/actions/newmessage.php
index f6c4e31ac..25ce6c694 100644
--- a/actions/newmessage.php
+++ b/actions/newmessage.php
@@ -92,43 +92,8 @@ class NewmessageAction extends Action {
list($content, $user, $to) = $params;
assert(!is_null($user));
-
- common_element_start('form', array('id' => 'message_form',
- 'method' => 'post',
- 'action' => $this->self_url()));
-
- $mutual_users = $user->mutuallySubscribedUsers();
-
- $mutual = array();
-
- while ($mutual_users->fetch()) {
- if ($mutual_users->id != $user->id) {
- $mutual[$mutual_users->id] = $mutual_users->nickname;
- }
- }
- $mutual_users->free();
- unset($mutual_users);
-
- common_dropdown('to', _('To'), $mutual, NULL, FALSE, $to->id);
-
- common_element_start('p');
-
- common_element('textarea', array('id' => 'message_content',
- 'cols' => 60,
- 'rows' => 3,
- 'name' => 'content'),
- ($content) ? $content : '');
-
- common_element('input', array('id' => 'message_send',
- 'name' => 'message_send',
- 'type' => 'submit',
- 'value' => _('Send')));
-
- common_hidden('token', common_session_token());
-
- common_element_end('p');
- common_element_end('form');
+ common_message_form($content, $user, $to);
}
function show_form($msg=NULL) {