WordPress.org

Make WordPress Core

Changes from tags/2.3.2 at r46471 to tags/2.3.3 at r46471


Ignore:
Location:
tags/2.3.3
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • tags/2.3.3/wp-admin/install-helper.php

    r46471 r46471  
    11<?php
    2 require_once('../wp-config.php');
     2require_once(dirname(dirname(__FILE__)).'/wp-config.php');
    33$debug = 0;
    44
  • tags/2.3.3/wp-includes/gettext.php

    r46471 r46471  
    115115        $this->STREAM = $Reader;
    116116        $magic = $this->readint();
    117         if ($magic == ($MAGIC1 & 0xFFFFFFFF) || $magic == ($MAGIC3 & 0xFFFFFFFF)) { // to make sure it works for 64-bit platforms
     117        if ($magic == $MAGIC1 || $magic == $MAGIC3) { // to make sure it works for 64-bit platforms
    118118            $this->BYTEORDER = 0;
    119119        } elseif ($magic == ($MAGIC2 & 0xFFFFFFFF)) {
  • tags/2.3.3/wp-includes/pluggable.php

    r46471 r46471  
    226226    // Set the from name and email
    227227    $phpmailer->From = apply_filters( 'wp_mail_from', $from_email );
    228     $phpmailer->Sender = apply_filters( 'wp_mail_from', $from_email );
    229228    $phpmailer->FromName = apply_filters( 'wp_mail_from_name', $from_name );
    230229
  • tags/2.3.3/wp-includes/version.php

    r46471 r46471  
    33// This holds the version number in a separate file so we can bump it without cluttering the SVN
    44
    5 $wp_version = '2.3.2';
     5$wp_version = '2.3.3';
    66$wp_db_version = 6124;
    77
  • tags/2.3.3/xmlrpc.php

    r46471 r46471  
    976976        return $this->error;
    977977      }
    978 
    979       $cap = ($publish) ? 'publish_posts' : 'edit_posts';
    980978      $user = set_current_user(0, $user_login);
    981       if ( !current_user_can($cap) )
    982         return new IXR_Error(401, __('Sorry, you are not allowed to post on this blog.'));
    983 
    984         // The post_type defaults to post, but could also be page.
    985         $post_type = "post";
    986         if(
    987             !empty($content_struct["post_type"])
    988             && ($content_struct["post_type"] == "page")
    989         ) {
    990             $post_type = "page";
     979
     980        $cap = ( $publish ) ? 'publish_posts' : 'edit_posts';
     981        $error_message = __( 'Sorry, you are not allowed to publish posts on this blog.' );
     982        $post_type = 'post';
     983        if( !empty( $content_struct['post_type'] ) ) {
     984            if( $content_struct['post_type'] == 'page' ) {
     985                $cap = ( $publish ) ? 'publish_pages' : 'edit_pages';
     986                $error_message = __( 'Sorry, you are not allowed to publish pages on this blog.' );
     987                $post_type = 'page';
     988            }
     989            elseif( $content_type['post_type'] == 'post' ) {
     990                // This is the default, no changes needed
     991            }
     992            else {
     993                // No other post_type values are allowed here
     994                return new IXR_Error( 401, __( 'Invalid post type.' ) );
     995            }
     996        }
     997
     998        if( !current_user_can( $cap ) ) {
     999            return new IXR_Error( 401, $error_message );
    9911000        }
    9921001
     
    11881197        return $this->error;
    11891198      }
    1190 
    11911199        $user = set_current_user(0, $user_login);
    11921200
    1193         // The post_type defaults to post, but could also be page.
    1194         $post_type = "post";
    1195         if(
    1196             !empty($content_struct["post_type"])
    1197             && ($content_struct["post_type"] == "page")
    1198         ) {
    1199             $post_type = "page";
    1200         }
    1201 
    1202       // Edit page caps are checked in editPage.  Just check post here.
    1203       if ( ( 'post' == $post_type ) && !current_user_can('edit_post', $post_ID) )
    1204         return new IXR_Error(401, __('Sorry, you can not edit this post.'));
     1201        $cap = ( $publish ) ? 'publish_posts' : 'edit_posts';
     1202        $error_message = __( 'Sorry, you are not allowed to publish posts on this blog.' );
     1203        $post_type = 'post';
     1204        if( !empty( $content_struct['post_type'] ) ) {
     1205            if( $content_struct['post_type'] == 'page' ) {
     1206                $cap = ( $publish ) ? 'publish_pages' : 'edit_pages';
     1207                $error_message = __( 'Sorry, you are not allowed to publish pages on this blog.' );
     1208                $post_type = 'page';
     1209            }
     1210            elseif( $content_type['post_type'] == 'post' ) {
     1211                // This is the default, no changes needed
     1212            }
     1213            else {
     1214                // No other post_type values are allowed here
     1215                return new IXR_Error( 401, __( 'Invalid post type.' ) );
     1216            }
     1217        }
     1218
     1219        if( !current_user_can( $cap ) ) {
     1220            return new IXR_Error( 401, $error_message );
     1221        }
    12051222
    12061223      $postdata = wp_get_single_post($post_ID, ARRAY_A);
Note: See TracChangeset for help on using the changeset viewer.