]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
fix created, messages
authorEvan Prodromou <evan@prodromou.name>
Sat, 17 May 2008 19:52:01 +0000 (15:52 -0400)
committerEvan Prodromou <evan@prodromou.name>
Sat, 17 May 2008 19:52:01 +0000 (15:52 -0400)
darcs-hash:20080517195201-84dde-8f8269284e5fc00e9f2a6d8187059d0f59eae007.gz

actions/avatar.php
actions/newnotice.php
actions/register.php
actions/showstream.php
lib/common.php
lib/settingsaction.php

index 8a4557f3827c519af870827f82bd55dadd5fb67f..0b1025a3c4b2d0b658f3a47aababf937fa068cb5 100644 (file)
@@ -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;
        }
index ff5b7ccd308adab2a502ed68d0e5437b1f79884f..96726fafbb966b97fbfc2145d0d94c4e739c0d3f 100644 (file)
@@ -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');
        }
index 096eded79d8104945c29911ddc170bf7602e3a65..c156b46b2eda579c055f90864d78d8182f93795e 100644 (file)
@@ -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();
        }
 }
index 5c49832229facb47907c0f9917fb1920a74a8475..45e155feab9d9a46c3b0fed33479b1a60de031b7 100644 (file)
@@ -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');
        }
index fbe90e030674e38810a6d1e8896642d7765c5c52..730dae39571b525298e9e975e8271096b8ed9306 100644 (file)
@@ -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) {
index af7fcb25818c219f628cf89cf8885915e494ecc4..ae5b537f8cc53d3e33055423c0cd5c4e0ee4cecf 100644 (file)
@@ -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);