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:
parent
8f82a03a02
commit
15745c2230
|
@ -64,7 +64,7 @@ if ($drafts || $other_drafts) {
|
|||
<div class="wrap">
|
||||
<h2>
|
||||
<?php
|
||||
if ( isset( $_GET['m'] ) ) {
|
||||
if ( $_GET['m'] ) {
|
||||
echo $month[substr( $_GET['m'], 4, 2 )] . ' ' . substr( $_GET['m'], 0, 4 );
|
||||
} elseif ( isset( $_GET['s'] ) ) {
|
||||
printf(__('Search for “%s”'), wp_specialchars($_GET['s']) );
|
||||
|
|
|
@ -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_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:
|
||||
|
|
|
@ -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 '',
|
||||
|
|
|
@ -109,6 +109,12 @@ if ($edituser->user_level >= $user_level) die( __('You do not have permission to
|
|||
<th scope="row"><?php _e('Posts:') ?></th>
|
||||
<td><?php echo get_usernumposts($edituser->ID); ?></td>
|
||||
</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>
|
||||
<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>
|
||||
|
|
|
@ -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')");
|
||||
|
||||
|
|
|
@ -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')");
|
||||
|
||||
|
|
Loading…
Reference in New Issue