From 19f55afaf36cf96e43234ea9655f5752cadfaab3 Mon Sep 17 00:00:00 2001 From: donncha Date: Mon, 14 Nov 2005 16:04:14 +0000 Subject: WP Merge git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@434 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-inst/wp-admin/admin-functions.php | 42 ++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'wp-inst/wp-admin/admin-functions.php') diff --git a/wp-inst/wp-admin/admin-functions.php b/wp-inst/wp-admin/admin-functions.php index 7235f2a..f0e35f4 100644 --- a/wp-inst/wp-admin/admin-functions.php +++ b/wp-inst/wp-admin/admin-functions.php @@ -326,6 +326,10 @@ function edit_user($user_id = 0) { $errors['pass'] = __("ERROR: you typed your new password only once."); } + /* Check for "\" in password */ + if( strpos( " ".$pass1, "\\" ) ) + $errors['pass'] = __('ERROR: Passwords may not contain the character "\\".'); + /* checking the password has been typed twice the same */ if ($pass1 != $pass2) $errors['pass'] = __('ERROR: Please type the same password in the two password fields.'); @@ -508,8 +512,15 @@ function cat_rows($parent = 0, $level = 0, $categories = 0) { $category->cat_name = wp_specialchars($category->cat_name); $count = $wpdb->get_var("SELECT COUNT(post_id) FROM $wpdb->post2cat WHERE category_id = $category->cat_ID"); $pad = str_repeat('— ', $level); - if (current_user_can('manage_categories')) - $edit = "".__('Edit')."cat_ID, '".sprintf(__("You are about to delete the category "%s". All of its posts will go to the default category.\\n"OK" to delete, "Cancel" to stop."), wp_specialchars($category->cat_name, 1))."' );\" class='delete'>".__('Delete').""; + if ( current_user_can('manage_categories') ) { + $edit = "".__('Edit').""; + $default_cat_id = get_option('default_category'); + + if ($category->cat_ID != $default_cat_id) + $edit .= "cat_ID, '".sprintf(__("You are about to delete the category "%s". All of its posts will go to the default category.\\n"OK" to delete, "Cancel" to stop."), wp_specialchars($category->cat_name, 1))."' );\" class='delete'>".__('Delete').""; + else + $edit .= "".__("Default"); + } else $edit = ''; @@ -836,14 +847,11 @@ function update_meta($mid, $mkey, $mvalue) { function touch_time($edit = 1, $for_post = 1) { global $month, $post, $comment; - if ($for_post && ('draft' == $post->post_status)) { - $checked = 'checked="checked" '; - $edit = false; - } else { - $checked = ' '; - } - echo '
'; + if ( $for_post ) + $edit = ( ('draft' == $post->post_status) && (!$post->post_date || '0000-00-00 00:00:00' == $post->post_date) ) ? false : true; + + echo '
'; $time_adj = time() + (get_settings('gmt_offset') * 3600); $post_date = ($for_post) ? $post->post_date : $comment->comment_date; @@ -873,19 +881,11 @@ function touch_time($edit = 1, $for_post = 1) { : -: - post_status)) { - $jj = mysql2date('d', $post_date); - $mm = mysql2date('m', $post_date); - $aa = mysql2date('Y', $post_date); - $hh = mysql2date('H', $post_date); - $mn = mysql2date('i', $post_date); - $ss = mysql2date('s', $post_date); +