]> scripts.mit.edu Git - autoinstalls/wordpress.git/commitdiff
Wordpress 2.9.2 wordpress-2.9.2
authorEdward Z. Yang <ezyang@mit.edu>
Tue, 16 Feb 2010 04:51:47 +0000 (23:51 -0500)
committerEdward Z. Yang <ezyang@mit.edu>
Tue, 16 Feb 2010 04:51:47 +0000 (23:51 -0500)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
readme.html
wp-admin/edit-category-form.php
wp-admin/includes/plugin.php
wp-admin/includes/update-core.php
wp-admin/menu.php
wp-comments-post.php
wp-includes/functions.php
wp-includes/http.php
wp-includes/query.php
wp-includes/version.php

index abd7940e723ac65aaef6ce5f2fd88dbd63c6c442..f9b926f07020ff743000871174ce2567cf438c6a 100644 (file)
@@ -8,7 +8,7 @@
 <body>
 <h1 id="logo" style="text-align: center">
        <img alt="WordPress" src="wp-admin/images/wordpress-logo.png" />
-       <br /> Version 2.9.1
+       <br /> Version 2.9.2
 </h1>
 <p style="text-align: center">Semantic Personal Publishing Platform</p>
 
@@ -29,7 +29,7 @@
 
 <h1>Upgrading</h1>
 <p>Before you upgrade anything, make sure you have backup copies of any files you may have modified such as <code>index.php</code>.</p>
-<h2>Upgrading from any previous WordPress to 2.9.1:</h2>
+<h2>Upgrading from any previous WordPress to 2.9.2:</h2>
 <ol>
        <li>Delete your old WP files, saving ones you've modified.</li>
        <li>Upload the new files.</li>
index 53c60b57984c413f6db43269f28c7c0e92517437..a37f82e47110b0ca641a1758cfd3faa9f598bd95 100644 (file)
@@ -56,7 +56,7 @@ _fill_empty_category($category);
        <table class="form-table">
                <tr class="form-field form-required">
                        <th scope="row" valign="top"><label for="cat_name"><?php _e('Category Name') ?></label></th>
-                       <td><input name="cat_name" id="cat_name" type="text" value="<?php echo esc_attr($category->name); ?>" size="40" aria-required="true" /><br />
+                       <td><input name="cat_name" id="cat_name" type="text" value="<?php echo esc_attr($category->name); ?>" size="40" aria-required="true" /></td>
                </tr>
                <tr class="form-field">
                        <th scope="row" valign="top"><label for="category_nicename"><?php _e('Category Slug') ?></label></th>
index da1e076a8bb6ecab600daa6ddeaead19eb17e0d3..b09f610244b6a81905fe8df12bbb0c3014f151e2 100644 (file)
@@ -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) ) {
index a96332d4da4630ef8bffe726c59c023aad54a332..d179e1eb9bf25980483ae1b76bbbb08164e5c8d8 100644 (file)
@@ -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' );
 
index cac2be509df422105bd0784c3dc041216c9c47b4..31a876ea8ce82d7e230bca208345afd41db8c3f3 100644 (file)
@@ -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]);
                }
        }
index 923b03b99c0921820dcbfa16d0d3a5b360ebc242..e60d159ddcf0b3a5556648b5ef249e6f54af6383 100644 (file)
@@ -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);
 }
index c4a481bef8a689d896c007dd0aef98fa8ee7a742..1df479e683425af16125f2b055b5fdaaebcc0731 100644 (file)
@@ -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 ");
 }
 ?>
index 46b94c7c59b00fa9ae8a9427b0fe2a1a482b87aa..e8d1344ccd14192330b8a8d3817cb6afb7b27dd9 100644 (file)
@@ -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 );
                }
 
index 88440cba9f7ef469db6865de2c43b12be94a0228..92da5a4f03457d4abde5ee8e1318573484776308 100644 (file)
@@ -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();
index 0fc45fc4c5bcf674d00c1b8ea39dd2437885ed85..0cbd4f434b49e2f49df6145ca87f75e3be4470f5 100644 (file)
@@ -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.