]> scripts.mit.edu Git - autoinstalls/wordpress.git/commitdiff
Wordpress 3.0.6 wordpress-3.0.6
authorEdward Z. Yang <ezyang@mit.edu>
Sun, 22 May 2011 09:57:39 +0000 (10:57 +0100)
committerEdward Z. Yang <ezyang@mit.edu>
Sun, 22 May 2011 09:57:39 +0000 (10:57 +0100)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
readme.html
wp-admin/includes/media.php
wp-admin/includes/update-core.php
wp-admin/media-upload.php
wp-admin/press-this.php
wp-admin/upgrade.php
wp-includes/default-filters.php
wp-includes/link-template.php
wp-includes/version.php

index 09747ce273a30bcb92f45846c435fee35e3208b0..7dc2540c87702127fed0f0ca3b906789fdc014cc 100644 (file)
@@ -8,7 +8,7 @@
 <body>
 <h1 id="logo">
        <a href="http://wordpress.org/"><img alt="WordPress" src="wp-admin/images/wordpress-logo.png" width="250" height="68" /></a>
-       <br /> Version 3.0.5
+       <br /> Version 3.0.6
 </h1>
 <p style="text-align: center">Semantic Personal Publishing Platform</p>
 
index e5c89e071abb4eeb8dd001de5babeca208482a3a..2bebcc86d95936e40f86503915e13553c159c7a3 100644 (file)
@@ -493,6 +493,7 @@ function media_upload_image() {
        $id = 0;
 
        if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
+               check_admin_referer('media-form');
                // Upload File button was clicked
                $id = media_handle_upload('async-upload', $_REQUEST['post_id']);
                unset($_FILES);
@@ -598,6 +599,7 @@ function media_upload_audio() {
        $id = 0;
 
        if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
+               check_admin_referer('media-form');
                // Upload File button was clicked
                $id = media_handle_upload('async-upload', $_REQUEST['post_id']);
                unset($_FILES);
@@ -656,6 +658,7 @@ function media_upload_video() {
        $id = 0;
 
        if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
+               check_admin_referer('media-form');
                // Upload File button was clicked
                $id = media_handle_upload('async-upload', $_REQUEST['post_id']);
                unset($_FILES);
@@ -714,6 +717,7 @@ function media_upload_file() {
        $id = 0;
 
        if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
+               check_admin_referer('media-form');
                // Upload File button was clicked
                $id = media_handle_upload('async-upload', $_REQUEST['post_id']);
                unset($_FILES);
index ca2a1ee0465801a9e3606ff12c6602d91f3031ee..7431d7fd002710186101676ec7eb4bce0f2411ca 100644 (file)
@@ -274,7 +274,7 @@ function update_core($from, $to) {
        $mysql_version  = $wpdb->db_version();
        $required_php_version = '4.3';
        $required_mysql_version = '4.1.2';
-       $wp_version = '3.0.5';
+       $wp_version = '3.0.6';
        $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 bd21e4bc4982534b13b197b6ee4073e3d97e69af..fc3bf3253c5c6ee89f3c1ea442aabd6da5fc6607 100644 (file)
@@ -35,6 +35,7 @@ if ( isset($_GET['inline']) ) {
        $errors = array();
 
        if ( isset($_POST['html-upload']) && !empty($_FILES) ) {
+               check_admin_referer('media-form');
                // Upload File button was clicked
                $id = media_handle_upload('async-upload', $_REQUEST['post_id']);
                unset($_FILES);
index 903992cb211c15bf35acaa928e9e027f6d370f17..04f8d0f58ba44e7bb6952987438021fd402a5190 100644 (file)
@@ -52,7 +52,12 @@ function press_it() {
                }
        }
        // set the post_content and status
-       $quick['post_status'] = isset($_POST['publish']) ? 'publish' : 'draft';
+       if ( isset( $_POST['publish'] ) && current_user_can( 'publish_posts' ) )
+               $quick['post_status'] = 'publish';
+       elseif ( isset( $_POST['review'] ) )
+               $quick['post_status'] = 'pending';
+       else
+               $quick['post_status'] = 'draft';
        $quick['post_content'] = $content;
        // error handling for media_sideload
        if ( is_wp_error($upload) ) {
index d026479971c8197f14d99b34b13f751081bebcc0..01af6aa1085f478a19919486b765683a1114024e 100644 (file)
@@ -86,7 +86,7 @@ switch ( $step ) :
                wp_upgrade();
 
                        $backto = !empty($_GET['backto']) ? stripslashes( urldecode( $_GET['backto'] ) ) :  __get_option( 'home' ) . '/';
-                       $backto = esc_url_raw( $backto );
+                       $backto = esc_url( $backto );
                        $backto = wp_validate_redirect($backto, __get_option( 'home' ) . '/');
 ?>
 <h2><?php _e( 'Upgrade Complete' ); ?></h2>
index 3fb31bcfaeff4d612e3777766f27279fb9910a66..8898864e01e5d1c511812bac3a1d26a3965f428b 100644 (file)
@@ -32,9 +32,11 @@ foreach ( array( 'pre_term_description', 'pre_link_description', 'pre_link_notes
 }
 
 // Kses only for textarea admin displays
-foreach ( array( 'term_description', 'link_description', 'link_notes', 'user_description', 'comment_text' ) as $filter ) {
+foreach ( array( 'term_description', 'link_description', 'link_notes', 'user_description' ) as $filter ) {
        add_filter( $filter, 'wp_kses_data' );
 }
+if ( is_admin() )
+       add_filter( 'comment_text', 'wp_kses_post' );
 
 // Email saves
 foreach ( array( 'pre_comment_author_email', 'pre_user_email' ) as $filter ) {
index a800da86b25eb59ee9ba915fd48d457b0818abd6..3511e909bc25d378e8ca90cff0a1853117967c79 100644 (file)
@@ -2215,7 +2215,7 @@ function wp_shortlink_wp_head() {
        if ( empty( $shortlink ) )
                return;
 
-       echo "<link rel='shortlink' href='" . esc_url_raw( $shortlink ) . "' />\n";
+       echo "<link rel='shortlink' href='" . esc_url( $shortlink ) . "' />\n";
 }
 
 /**
index 5977122f1907ab9fa28f9ac4acb287b77ed80d44..7d25e8dfe4b10ec6190906fb0b7bc1d4e0a6c213 100644 (file)
@@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  * @global string $wp_version
  */
-$wp_version = '3.0.5';
+$wp_version = '3.0.6';
 
 /**
  * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.