summaryrefslogtreecommitdiff
path: root/actions/newnotice.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@prodromou.name>2008-05-17 15:52:01 -0400
committerEvan Prodromou <evan@prodromou.name>2008-05-17 15:52:01 -0400
commit466f0489c364441c125dffe6c9040bf6fcafd043 (patch)
tree273f4599d8322545a8c831489ffde3c4c876c069 /actions/newnotice.php
parent850bfc0a35bfb0dbfcb9ba4d7eb859f35224bc07 (diff)
fix created, messages
darcs-hash:20080517195201-84dde-8f8269284e5fc00e9f2a6d8187059d0f59eae007.gz
Diffstat (limited to 'actions/newnotice.php')
-rw-r--r--actions/newnotice.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/actions/newnotice.php b/actions/newnotice.php
index ff5b7ccd3..96726fafb 100644
--- a/actions/newnotice.php
+++ b/actions/newnotice.php
@@ -29,8 +29,7 @@ class NewnoticeAction extends Action {
common_user_error(_t('Not logged in.'));
} else if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$id = $this->save_new_notice();
-
- if ($id) {
+# if ($id) {
common_broadcast_notices($id);
common_redirect(common_local_url('shownotice',
array('notice' => $id)), 303);
@@ -49,7 +48,7 @@ class NewnoticeAction extends Action {
assert($notice);
$notice->profile_id = $user->id; # user id *is* profile id
$notice->content = $this->arg('content');
- $notice->created = time();
+ $notice->created = date(DATE_RFC822); # current time
return $notice->insert();
}
@@ -57,7 +56,9 @@ class NewnoticeAction extends Action {
common_element_start('form', array('id' => 'newnotice', 'method' => 'POST',
'action' => common_local_url('newnotice')));
common_element('span', 'nickname', $profile->nickname);
- common_element('textarea', array('rows' => 4, 'cols' => 80, 'id' => 'content'));
+ common_element('textarea', array('rows' => 4, 'cols' => 80,
+ 'name' => 'content',
+ 'id' => 'content'));
common_element('input', array('type' => 'submit', 'value' => 'Send'));
common_element_end('form');
}