From: Edward Z. Yang Date: Tue, 16 Feb 2010 04:51:47 +0000 (-0500) Subject: Wordpress 2.9.2 X-Git-Tag: wordpress-2.9.2 X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/commitdiff_plain/refs/tags/wordpress-2.9.2 Wordpress 2.9.2 Signed-off-by: Edward Z. Yang --- diff --git a/readme.html b/readme.html index abd7940e..f9b926f0 100644 --- a/readme.html +++ b/readme.html @@ -8,7 +8,7 @@

WordPress -
Version 2.9.1 +
Version 2.9.2

Semantic Personal Publishing Platform

@@ -29,7 +29,7 @@

Upgrading

Before you upgrade anything, make sure you have backup copies of any files you may have modified such as index.php.

-

Upgrading from any previous WordPress to 2.9.1:

+

Upgrading from any previous WordPress to 2.9.2:

  1. Delete your old WP files, saving ones you've modified.
  2. Upload the new files.
  3. diff --git a/wp-admin/edit-category-form.php b/wp-admin/edit-category-form.php index 53c60b57..a37f82e4 100644 --- a/wp-admin/edit-category-form.php +++ b/wp-admin/edit-category-form.php @@ -56,7 +56,7 @@ _fill_empty_category($category); - diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index da1e076a..b09f6102 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -591,7 +591,7 @@ function add_menu_page( $page_title, $menu_title, $access_level, $file, $functio $admin_page_hooks[$file] = sanitize_title( $menu_title ); $hookname = get_plugin_page_hookname( $file, '' ); - if (!empty ( $function ) && !empty ( $hookname )) + if (!empty ( $function ) && !empty ( $hookname ) && current_user_can( $access_level ) ) add_action( $hookname, $function ); if ( empty($icon_url) ) { diff --git a/wp-admin/includes/update-core.php b/wp-admin/includes/update-core.php index a96332d4..d179e1eb 100644 --- a/wp-admin/includes/update-core.php +++ b/wp-admin/includes/update-core.php @@ -223,7 +223,7 @@ function update_core($from, $to) { $mysql_version = $wpdb->db_version(); $required_php_version = '4.3'; $required_mysql_version = '4.1.2'; - $wp_version = '2.9.1'; + $wp_version = '2.9.2'; $php_compat = version_compare( $php_version, $required_php_version, '>=' ); $mysql_compat = version_compare( $mysql_version, $required_mysql_version, '>=' ) || file_exists( WP_CONTENT_DIR . '/db.php' ); diff --git a/wp-admin/menu.php b/wp-admin/menu.php index cac2be50..31a876ea 100644 --- a/wp-admin/menu.php +++ b/wp-admin/menu.php @@ -198,11 +198,13 @@ do_action('admin_menu', ''); // Remove menus that have no accessible submenus and require privs that the user does not have. // Run re-parent loop again. foreach ( $menu as $id => $data ) { + if ( ! current_user_can($data[1]) ) + $_wp_menu_nopriv[$data[2]] = true; + // If submenu is empty... if ( empty($submenu[$data[2]]) ) { // And user doesn't have privs, remove menu. - if ( ! current_user_can($data[1]) ) { - $_wp_menu_nopriv[$data[2]] = true; + if ( isset( $_wp_menu_nopriv[$data[2]] ) ) { unset($menu[$id]); } } diff --git a/wp-comments-post.php b/wp-comments-post.php index 923b03b9..e60d159d 100644 --- a/wp-comments-post.php +++ b/wp-comments-post.php @@ -27,12 +27,15 @@ if ( empty($status->comment_status) ) { } elseif ( !comments_open($comment_post_ID) ) { do_action('comment_closed', $comment_post_ID); wp_die( __('Sorry, comments are closed for this item.') ); -} elseif ( in_array($status->post_status, array('draft', 'pending') ) ) { +} elseif ( in_array($status->post_status, array('draft', 'future', 'pending') ) ) { do_action('comment_on_draft', $comment_post_ID); exit; } elseif ( 'trash' == $status->post_status ) { do_action('comment_on_trash', $comment_post_ID); exit; +} elseif ( post_password_required($comment_post_ID) ) { + do_action('comment_on_password_protected', $comment_post_ID); + exit; } else { do_action('pre_comment_on_post', $comment_post_ID); } diff --git a/wp-includes/functions.php b/wp-includes/functions.php index c4a481be..1df479e6 100644 --- a/wp-includes/functions.php +++ b/wp-includes/functions.php @@ -3635,6 +3635,6 @@ function get_file_data( $file, $default_headers, $context = '' ) { * @since 2.9.0 */ function _search_terms_tidy($t) { - return trim($t, "\"\'\n\r "); + return trim($t, "\"'\n\r "); } ?> diff --git a/wp-includes/http.php b/wp-includes/http.php index 46b94c7c..e8d1344c 100644 --- a/wp-includes/http.php +++ b/wp-includes/http.php @@ -1816,18 +1816,18 @@ class WP_Http_Encoding { * @return string|bool False on failure. */ function decompress( $compressed, $length = null ) { - $decompressed = WP_Http_Encoding::compatible_gzinflate( $compressed ); - if ( false !== $decompressed ) + if ( false !== ( $decompressed = @gzinflate( $compressed ) ) ) return $decompressed; - $decompressed = gzuncompress( $compressed ); + if ( false !== ( $decompressed = WP_Http_Encoding::compatible_gzinflate( $compressed ) ) ) + return $decompressed; - if ( false !== $decompressed ) + if ( false !== ( $decompressed = @gzuncompress( $compressed ) ) ) return $decompressed; if ( function_exists('gzdecode') ) { - $decompressed = gzdecode( $compressed ); + $decompressed = @gzdecode( $compressed ); if ( false !== $decompressed ) return $decompressed; @@ -1916,7 +1916,7 @@ class WP_Http_Encoding { if ( is_array( $headers ) ) { if ( array_key_exists('content-encoding', $headers) && ! empty( $headers['content-encoding'] ) ) return true; - } else if( is_string( $headers ) ) { + } else if ( is_string( $headers ) ) { return ( stripos($headers, 'content-encoding:') !== false ); } diff --git a/wp-includes/query.php b/wp-includes/query.php index 88440cba..92da5a4f 100644 --- a/wp-includes/query.php +++ b/wp-includes/query.php @@ -2280,7 +2280,7 @@ class WP_Query { // User must be logged in to view unpublished posts. $this->posts = array(); } else { - if (in_array($status, array('draft', 'pending')) ) { + if (in_array($status, array('draft', 'pending', 'trash')) ) { // User must have edit permissions on the draft to preview. if (! current_user_can("edit_$post_type_cap", $this->posts[0]->ID)) { $this->posts = array(); diff --git a/wp-includes/version.php b/wp-includes/version.php index 0fc45fc4..0cbd4f43 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -8,7 +8,7 @@ * * @global string $wp_version */ -$wp_version = '2.9.1'; +$wp_version = '2.9.2'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.

    +