From 15745c22307a0ae8d33c0beb0fe70853debfc2c0 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Fri, 17 Dec 2004 19:27:35 +0000 Subject: [PATCH] Change dateYMDhour to be something more sane, bugfix on edit.php. git-svn-id: http://svn.automattic.com/wordpress/trunk@1971 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit.php | 2 +- wp-admin/upgrade-functions.php | 2 +- wp-admin/upgrade-schema.php | 2 +- wp-admin/user-edit.php | 6 ++++++ wp-admin/users.php | 2 +- wp-register.php | 2 +- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/wp-admin/edit.php b/wp-admin/edit.php index e44c0823c2..7c1f1ba7a3 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -64,7 +64,7 @@ if ($drafts || $other_drafts) {

query("UPDATE $wpdb->posts SET post_modified = post_date"); $wpdb->query("UPDATE $wpdb->posts SET post_modified_gmt = DATE_ADD(post_modified, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE) WHERE post_modified != '0000-00-00 00:00:00'"); $wpdb->query("UPDATE $wpdb->comments SET comment_date_gmt = DATE_ADD(comment_date, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)"); - $wpdb->query("UPDATE $wpdb->users SET dateYMDhour = DATE_ADD(dateYMDhour, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)"); + $wpdb->query("UPDATE $wpdb->users SET user_registered = DATE_ADD(dateYMDhour, INTERVAL '$add_hours:$add_minutes' HOUR_MINUTE)"); } // First we need to enlarge option_value so it can hold larger values: diff --git a/wp-admin/upgrade-schema.php b/wp-admin/upgrade-schema.php index 72a3afbb8e..151351a471 100644 --- a/wp-admin/upgrade-schema.php +++ b/wp-admin/upgrade-schema.php @@ -135,7 +135,7 @@ CREATE TABLE $wpdb->users ( user_ip varchar(15) NOT NULL default '', user_domain varchar(200) NOT NULL default '', user_browser varchar(200) NOT NULL default '', - dateYMDhour datetime NOT NULL default '0000-00-00 00:00:00', + user_registered datetime NOT NULL default '0000-00-00 00:00:00', user_level int(2) unsigned NOT NULL default '0', user_aim varchar(50) NOT NULL default '', user_msn varchar(100) NOT NULL default '', diff --git a/wp-admin/user-edit.php b/wp-admin/user-edit.php index e746257967..b1da52affa 100644 --- a/wp-admin/user-edit.php +++ b/wp-admin/user-edit.php @@ -109,6 +109,12 @@ if ($edituser->user_level >= $user_level) die( __('You do not have permission to ID); ?> +user_registered ) { ?> + + + user_registered, 0, 11); ?> + + diff --git a/wp-admin/users.php b/wp-admin/users.php index 055cd61d14..838e526905 100644 --- a/wp-admin/users.php +++ b/wp-admin/users.php @@ -71,7 +71,7 @@ case 'adduser': $new_users_can_blog = get_settings('new_users_can_blog'); $result = $wpdb->query("INSERT INTO $wpdb->users - (user_login, user_pass, user_nickname, user_email, user_ip, user_domain, user_browser, dateYMDhour, user_level, user_idmode, user_firstname, user_lastname, user_nicename, user_url) + (user_login, user_pass, user_nickname, user_email, user_ip, user_domain, user_browser, user_registered, user_level, user_idmode, user_firstname, user_lastname, user_nicename, user_url) VALUES ('$user_login', MD5('$pass1'), '$user_nickname', '$user_email', '$user_ip', '$user_domain', '$user_browser', '$now', '$new_users_can_blog', 'nickname', '$user_firstname', '$user_lastname', '$user_nicename', '$user_uri')"); diff --git a/wp-register.php b/wp-register.php index 8f5d8ce330..516ad895ec 100644 --- a/wp-register.php +++ b/wp-register.php @@ -71,7 +71,7 @@ case 'register': if (get_settings('new_users_can_blog') >= 1) $user_level = 1; $result = $wpdb->query("INSERT INTO $wpdb->users - (user_login, user_pass, user_nickname, user_email, user_ip, user_browser, dateYMDhour, user_level, user_idmode, user_nicename) + (user_login, user_pass, user_nickname, user_email, user_ip, user_browser, user_registered, user_level, user_idmode, user_nicename) VALUES ('$user_login', MD5('$pass1'), '$user_nickname', '$user_email', '$user_ip', '$user_browser', '$now', '$user_level', 'nickname', '$user_nicename')");