]> scripts.mit.edu Git - autoinstalls/wordpress.git/commitdiff
Wordpress 2.3.3 wordpress-2.3.3
authorEdward Z. Yang <ezyang@mit.edu>
Sat, 21 Nov 2009 00:38:51 +0000 (19:38 -0500)
committerEdward Z. Yang <ezyang@mit.edu>
Sat, 21 Nov 2009 00:38:51 +0000 (19:38 -0500)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
wp-admin/install-helper.php
wp-content/plugins/akismet/akismet.php
wp-includes/gettext.php
wp-includes/pluggable.php
wp-includes/version.php
xmlrpc.php

index ecfc91d5572f63c4f990f8aa8b675c0cbc218f05..b53376eb3ca60eb9452505b07ab45c9f6396ee68 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-require_once('../wp-config.php');
+require_once(dirname(dirname(__FILE__)).'/wp-config.php');
 $debug = 0;
 
 /**
@@ -149,4 +149,4 @@ if (check_column($wpdb->links, 'link_description', 'varchar(255)')) {
 }
 echo "</pre>";
 */
-?>
\ No newline at end of file
+?>
index eac405598367a7ddefec41c634d57c7e75f22f60..3a434767dae6de4a48e9491907d8af7afbe30400 100644 (file)
@@ -569,7 +569,7 @@ echo "<p>$r</p>";
 <form method="post" action="<?php echo attribute_escape( add_query_arg( 'noheader', 'true' ) ); ?>">
 <?php akismet_nonce_field($akismet_nonce) ?>
 <p><input type="hidden" name="action" value="delete" />
-<?php printf(__('There are currently %1$s comments identified as spam.'), $spam_count); ?>&nbsp; &nbsp; <input type="submit" name="Submit" value="<?php echo attribute_escape(__('Delete all')); ?>" />
+<?php printf(__('There are currently %1$s comments identified as spam.'), $spam_count); ?>&nbsp; &nbsp; <input type="submit" name="Submit" class="button" value="<?php echo attribute_escape(__('Delete all')); ?>" />
 <input type="hidden" name="display_time" value="<?php echo current_time('mysql', 1); ?>" /></p>
 </form>
 <?php } ?>
index 72558ccf708d49f1e2e93da39a51f0895a2a694b..5b78127c00b835605756eb36704785980e7e46a4 100644 (file)
@@ -114,7 +114,7 @@ class gettext_reader {
 
                $this->STREAM = $Reader;
                $magic = $this->readint();
-               if ($magic == ($MAGIC1 & 0xFFFFFFFF) || $magic == ($MAGIC3 & 0xFFFFFFFF)) { // to make sure it works for 64-bit platforms
+               if ($magic == $MAGIC1 || $magic == $MAGIC3) { // to make sure it works for 64-bit platforms
                        $this->BYTEORDER = 0;
                } elseif ($magic == ($MAGIC2 & 0xFFFFFFFF)) {
                        $this->BYTEORDER = 1;
index 32281e67d78a8bab50be9a3611c43ba17d85bdee..6cff71d27687a4487fcf545ee75628d0256079e6 100644 (file)
@@ -225,7 +225,6 @@ function wp_mail( $to, $subject, $message, $headers = '' ) {
 
        // Set the from name and email
        $phpmailer->From = apply_filters( 'wp_mail_from', $from_email );
-       $phpmailer->Sender = apply_filters( 'wp_mail_from', $from_email );
        $phpmailer->FromName = apply_filters( 'wp_mail_from_name', $from_name );
 
        // Set destination address
index ae3a9442f773b6cbd90a70b46d216f4bf093f28e..6459c194fd51b9a805e1170837f01e00e6b26ba5 100644 (file)
@@ -2,7 +2,7 @@
 
 // This holds the version number in a separate file so we can bump it without cluttering the SVN
 
-$wp_version = '2.3.2';
+$wp_version = '2.3.3';
 $wp_db_version = 6124;
 
 ?>
index 00fbc384b6324a9782300efaec25bff35cc36479..56d58432ad8d857a7c7910613c96c7ef5ba42f92 100644 (file)
@@ -975,19 +975,28 @@ class wp_xmlrpc_server extends IXR_Server {
          if (!$this->login_pass_ok($user_login, $user_pass)) {
            return $this->error;
          }
-
-      $cap = ($publish) ? 'publish_posts' : 'edit_posts';
          $user = set_current_user(0, $user_login);
-         if ( !current_user_can($cap) )
-           return new IXR_Error(401, __('Sorry, you are not allowed to post on this blog.'));
 
-               // The post_type defaults to post, but could also be page.
-               $post_type = "post";
-               if(
-                       !empty($content_struct["post_type"])
-                       && ($content_struct["post_type"] == "page")
-               ) {
-                       $post_type = "page";
+               $cap = ( $publish ) ? 'publish_posts' : 'edit_posts';
+               $error_message = __( 'Sorry, you are not allowed to publish posts on this blog.' );
+               $post_type = 'post';
+               if( !empty( $content_struct['post_type'] ) ) {
+                       if( $content_struct['post_type'] == 'page' ) {
+                               $cap = ( $publish ) ? 'publish_pages' : 'edit_pages';
+                               $error_message = __( 'Sorry, you are not allowed to publish pages on this blog.' );
+                               $post_type = 'page';
+                       }
+                       elseif( $content_type['post_type'] == 'post' ) {
+                               // This is the default, no changes needed
+                       }
+                       else {
+                               // No other post_type values are allowed here
+                               return new IXR_Error( 401, __( 'Invalid post type.' ) );
+                       }
+               }
+
+               if( !current_user_can( $cap ) ) {
+                       return new IXR_Error( 401, $error_message );
                }
 
                // Let WordPress generate the post_name (slug) unless
@@ -1187,21 +1196,29 @@ class wp_xmlrpc_server extends IXR_Server {
          if (!$this->login_pass_ok($user_login, $user_pass)) {
            return $this->error;
          }
-
                $user = set_current_user(0, $user_login);
 
-               // The post_type defaults to post, but could also be page.
-               $post_type = "post";
-               if(
-                       !empty($content_struct["post_type"])
-                       && ($content_struct["post_type"] == "page")
-               ) {
-                       $post_type = "page";
+               $cap = ( $publish ) ? 'publish_posts' : 'edit_posts';
+               $error_message = __( 'Sorry, you are not allowed to publish posts on this blog.' );
+               $post_type = 'post';
+               if( !empty( $content_struct['post_type'] ) ) {
+                       if( $content_struct['post_type'] == 'page' ) {
+                               $cap = ( $publish ) ? 'publish_pages' : 'edit_pages';
+                               $error_message = __( 'Sorry, you are not allowed to publish pages on this blog.' );
+                               $post_type = 'page';
+                       }
+                       elseif( $content_type['post_type'] == 'post' ) {
+                               // This is the default, no changes needed
+                       }
+                       else {
+                               // No other post_type values are allowed here
+                               return new IXR_Error( 401, __( 'Invalid post type.' ) );
+                       }
                }
 
-         // Edit page caps are checked in editPage.  Just check post here.
-         if ( ( 'post' == $post_type ) && !current_user_can('edit_post', $post_ID) )
-           return new IXR_Error(401, __('Sorry, you can not edit this post.'));
+               if( !current_user_can( $cap ) ) {
+                       return new IXR_Error( 401, $error_message );
+               }
 
          $postdata = wp_get_single_post($post_ID, ARRAY_A);