summaryrefslogtreecommitdiff
path: root/actions
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
parent850bfc0a35bfb0dbfcb9ba4d7eb859f35224bc07 (diff)
fix created, messages
darcs-hash:20080517195201-84dde-8f8269284e5fc00e9f2a6d8187059d0f59eae007.gz
Diffstat (limited to 'actions')
-rw-r--r--actions/avatar.php3
-rw-r--r--actions/newnotice.php9
-rw-r--r--actions/register.php5
-rw-r--r--actions/showstream.php4
4 files changed, 13 insertions, 8 deletions
diff --git a/actions/avatar.php b/actions/avatar.php
index 8a4557f38..0b1025a3c 100644
--- a/actions/avatar.php
+++ b/actions/avatar.php
@@ -123,7 +123,7 @@ class AvatarAction extends SettingsAction {
$avatar->filename = $filename;
$avatar->original = true;
$avatar->url = common_avatar_url($filename);
-
+ $avatar->created = date(DATE_RFC822); # current time
foreach (array(AVATAR_PROFILE_SIZE, AVATAR_STREAM_SIZE, AVATAR_MINI_SIZE) as $size) {
$scaled[] = $this->scale_avatar($user, $avatar, $size);
}
@@ -181,6 +181,7 @@ class AvatarAction extends SettingsAction {
$scaled->mediatype = ($avatar->mediattype == 'image/jpeg') ? 'image/jpeg' : 'image/png';
$scaled->filename = $filename;
$scaled->url = common_avatar_url($filename);
+ $scaled->created = date(DATE_RFC822); # current time
return $scaled;
}
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');
}
diff --git a/actions/register.php b/actions/register.php
index 096eded79..c156b46b2 100644
--- a/actions/register.php
+++ b/actions/register.php
@@ -81,7 +81,7 @@ class RegisterAction extends Action {
# TODO: wrap this in a transaction!
$profile = new Profile();
$profile->nickname = $nickname;
- $profile->created = time();
+ $profile->created = date(DATE_RFC822); # current time
$id = $profile->insert();
if (!$id) {
return FALSE;
@@ -91,7 +91,7 @@ class RegisterAction extends Action {
$user->nickname = $nickname;
$user->password = common_munge_password($password, $id);
$user->email = $email;
- $user->created = time();
+ $user->created = date(DATE_RFC822); # current time
$result = $user->insert();
if (!$result) {
# Try to clean up...
@@ -135,5 +135,6 @@ class RegisterAction extends Action {
'id' => 'cancel',
'value' => _t('Cancel')));
common_element_end('form');
+ common_show_footer();
}
}
diff --git a/actions/showstream.php b/actions/showstream.php
index 5c4983222..45e155fea 100644
--- a/actions/showstream.php
+++ b/actions/showstream.php
@@ -81,7 +81,9 @@ class ShowstreamAction extends StreamAction {
function notice_form() {
common_element_start('form', array('id' => 'newnotice', 'method' => 'POST',
'action' => common_local_url('newnotice')));
- 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');
}