summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/avatar.php3
-rw-r--r--actions/newnotice.php9
-rw-r--r--actions/register.php5
-rw-r--r--actions/showstream.php4
-rw-r--r--lib/common.php2
-rw-r--r--lib/settingsaction.php2
6 files changed, 15 insertions, 10 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');
}
diff --git a/lib/common.php b/lib/common.php
index fbe90e030..730dae395 100644
--- a/lib/common.php
+++ b/lib/common.php
@@ -293,7 +293,7 @@ function common_local_url($action, $args=NULL) {
function common_date_string($dt) {
// XXX: do some sexy date formatting
- return date(DATE_RFC822);
+ return date(DATE_RFC822, $dt);
}
function common_redirect($url, $code=307) {
diff --git a/lib/settingsaction.php b/lib/settingsaction.php
index af7fcb258..ae5b537f8 100644
--- a/lib/settingsaction.php
+++ b/lib/settingsaction.php
@@ -42,7 +42,7 @@ class SettingsAction extends Action {
return false;
}
- function show_message($msg, $success) {
+ function message($msg, $success) {
if ($msg) {
common_element('div', ($success) ? 'success' : 'error',
$msg);