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
This commit is contained in:
saxmatt 2004-12-17 19:27:35 +00:00
parent 8f82a03a02
commit 15745c2230
6 changed files with 11 additions and 5 deletions

View File

@ -64,7 +64,7 @@ if ($drafts || $other_drafts) {
<div class="wrap"> <div class="wrap">
<h2> <h2>
<?php <?php
if ( isset( $_GET['m'] ) ) { if ( $_GET['m'] ) {
echo $month[substr( $_GET['m'], 4, 2 )] . ' ' . substr( $_GET['m'], 0, 4 ); echo $month[substr( $_GET['m'], 4, 2 )] . ' ' . substr( $_GET['m'], 0, 4 );
} elseif ( isset( $_GET['s'] ) ) { } elseif ( isset( $_GET['s'] ) ) {
printf(__('Search for &#8220;%s&#8221;'), wp_specialchars($_GET['s']) ); printf(__('Search for &#8220;%s&#8221;'), wp_specialchars($_GET['s']) );

View File

@ -129,7 +129,7 @@ function upgrade_110() {
$wpdb->query("UPDATE $wpdb->posts SET post_modified = post_date"); $wpdb->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->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->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: // First we need to enlarge option_value so it can hold larger values:

View File

@ -135,7 +135,7 @@ CREATE TABLE $wpdb->users (
user_ip varchar(15) NOT NULL default '', user_ip varchar(15) NOT NULL default '',
user_domain varchar(200) NOT NULL default '', user_domain varchar(200) NOT NULL default '',
user_browser 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_level int(2) unsigned NOT NULL default '0',
user_aim varchar(50) NOT NULL default '', user_aim varchar(50) NOT NULL default '',
user_msn varchar(100) NOT NULL default '', user_msn varchar(100) NOT NULL default '',

View File

@ -109,6 +109,12 @@ if ($edituser->user_level >= $user_level) die( __('You do not have permission to
<th scope="row"><?php _e('Posts:') ?></th> <th scope="row"><?php _e('Posts:') ?></th>
<td><?php echo get_usernumposts($edituser->ID); ?></td> <td><?php echo get_usernumposts($edituser->ID); ?></td>
</tr> </tr>
<?php if ( '0000-00-00 00:00:00' != $edituser->user_registered ) { ?>
<tr>
<th scope="row"><?php _e('Registered on:') ?></th>
<td><?php echo substr($edituser->user_registered, 0, 11); ?></td>
</tr>
<?php } ?>
<tr> <tr>
<th scope="row"><?php _e('First name:') ?></th> <th scope="row"><?php _e('First name:') ?></th>
<td><input type="text" name="new_firstname" id="new_firstname" value="<?php echo $edituser->user_firstname ?>" /></td> <td><input type="text" name="new_firstname" id="new_firstname" value="<?php echo $edituser->user_firstname ?>" /></td>

View File

@ -71,7 +71,7 @@ case 'adduser':
$new_users_can_blog = get_settings('new_users_can_blog'); $new_users_can_blog = get_settings('new_users_can_blog');
$result = $wpdb->query("INSERT INTO $wpdb->users $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 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')"); ('$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')");

View File

@ -71,7 +71,7 @@ case 'register':
if (get_settings('new_users_can_blog') >= 1) $user_level = 1; if (get_settings('new_users_can_blog') >= 1) $user_level = 1;
$result = $wpdb->query("INSERT INTO $wpdb->users $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 VALUES
('$user_login', MD5('$pass1'), '$user_nickname', '$user_email', '$user_ip', '$user_browser', '$now', '$user_level', 'nickname', '$user_nicename')"); ('$user_login', MD5('$pass1'), '$user_nickname', '$user_email', '$user_ip', '$user_browser', '$now', '$user_level', 'nickname', '$user_nicename')");