Changeset 1196

Show
Ignore:
Timestamp:
02/05/08 15:34:44 (10 months ago)
Author:
donncha
Message:

Merge with WP 2.3.3

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/install-helper.php

    r810 r1196  
    11<?php 
    2 require_once('../wp-config.php'); 
     2require_once(dirname(dirname(__FILE__)).'/wp-config.php'); 
    33$debug = 0; 
    44 
  • trunk/wp-includes/class-IXR.php

    r463 r1196  
    11<?php 
    2 /*  
     2/* 
    33   IXR - The Inutio XML-RPC Library - (c) Incutio Ltd 2002-2005 
    44   Version 1.7 (beta) - Simon Willison, 23rd May 2005 
     
    4848        // If it is a normal PHP object convert it in to a struct 
    4949        if (is_object($this->data)) { 
    50              
     50 
    5151            $this->data = get_object_vars($this->data); 
    5252            return 'struct'; 
     
    255255        } 
    256256                $this->_currentTagContents = ''; 
    257     }        
     257    } 
    258258} 
    259259 
     
    380380                'specVersion' => 1 
    381381            ), 
    382         );    
     382        ); 
    383383    } 
    384384    function getCapabilities($args) { 
     
    585585    </value> 
    586586  </fault> 
    587 </methodResponse>  
     587</methodResponse> 
    588588 
    589589EOD; 
     
    659659        ); 
    660660        $this->addCallback( 
    661             'system.methodSignature',  
    662             'this:methodSignature',  
    663             array('array', 'string'),  
     661            'system.methodSignature', 
     662            'this:methodSignature', 
     663            array('array', 'string'), 
    664664            'Returns an array describing the return type and required parameters of a method' 
    665665        ); 
    666666        $this->addCallback( 
    667             'system.getCapabilities',  
    668             'this:getCapabilities',  
    669             array('struct'),  
     667            'system.getCapabilities', 
     668            'this:getCapabilities', 
     669            array('struct'), 
    670670            'Returns a struct describing the XML-RPC specifications supported by this server' 
    671671        ); 
    672672        $this->addCallback( 
    673             'system.listMethods',  
    674             'this:listMethods',  
    675             array('array'),  
     673            'system.listMethods', 
     674            'this:listMethods', 
     675            array('array'), 
    676676            'Returns an array of available methods on this server' 
    677677        ); 
    678678        $this->addCallback( 
    679             'system.methodHelp',  
    680             'this:methodHelp',  
    681             array('string', 'string'),  
     679            'system.methodHelp', 
     680            'this:methodHelp', 
     681            array('string', 'string'), 
    682682            'Returns a documentation string for the specified method' 
    683683        ); 
  • trunk/wp-includes/pluggable.php

    r1172 r1196  
    249249        // Set the from name and email 
    250250        $phpmailer->From = apply_filters( 'wp_mail_from', $from_email ); 
    251         $phpmailer->Sender = apply_filters( 'wp_mail_from', $from_email ); 
    252251        $phpmailer->FromName = apply_filters( 'wp_mail_from_name', $from_name ); 
    253252 
  • trunk/wp-includes/version.php

    r1192 r1196  
    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'; 
    6 $wpmu_version = '1.3.2'; 
     5$wp_version = '2.3.3'; 
     6$wpmu_version = '1.3.3'; 
    77$wp_db_version = 6124; 
    88 
  • trunk/xmlrpc.php

    r1194 r1196  
    989989            return $this->error; 
    990990          } 
    991  
    992       $cap = ($publish) ? 'publish_posts' : 'edit_posts'; 
    993991          $user = set_current_user(0, $user_login); 
    994           if ( !current_user_can($cap) ) 
    995             return new IXR_Error(401, __('Sorry, you are not allowed to post on this blog.')); 
    996  
    997                 // The post_type defaults to post, but could also be page. 
    998                 $post_type = "post"; 
    999                 if( 
    1000                         !empty($content_struct["post_type"]) 
    1001                         && ($content_struct["post_type"] == "page") 
    1002                 ) { 
    1003                         $post_type = "page"; 
     992 
     993                $cap = ( $publish ) ? 'publish_posts' : 'edit_posts'; 
     994                $error_message = __( 'Sorry, you are not allowed to publish posts on this blog.' ); 
     995                $post_type = 'post'; 
     996                if( !empty( $content_struct['post_type'] ) ) { 
     997                        if( $content_struct['post_type'] == 'page' ) { 
     998                                $cap = ( $publish ) ? 'publish_pages' : 'edit_pages'; 
     999                                $error_message = __( 'Sorry, you are not allowed to publish pages on this blog.' ); 
     1000                                $post_type = 'page'; 
     1001                        } 
     1002                        elseif( $content_type['post_type'] == 'post' ) { 
     1003                                // This is the default, no changes needed 
     1004                        } 
     1005                        else { 
     1006                                // No other post_type values are allowed here 
     1007                                return new IXR_Error( 401, __( 'Invalid post type.' ) ); 
     1008                        } 
     1009                } 
     1010 
     1011                if( !current_user_can( $cap ) ) { 
     1012                        return new IXR_Error( 401, $error_message ); 
    10041013                } 
    10051014 
     
    12011210            return $this->error; 
    12021211          } 
    1203  
    12041212                $user = set_current_user(0, $user_login); 
    12051213 
    1206                 // The post_type defaults to post, but could also be page. 
    1207                 $post_type = "post"; 
    1208                 if( 
    1209                         !empty($content_struct["post_type"]) 
    1210                         && ($content_struct["post_type"] == "page") 
    1211                 ) { 
    1212                         if( !current_user_can( 'edit_page', $post_ID ) ) {  
    1213                                 return(new IXR_Error(401, __("Sorry, you do not have the right to edit this page.")));  
    1214                         }  
    1215  
    1216                         $post_type = "page"; 
    1217                 } 
    1218  
    1219           // Edit page caps are checked in editPage.  Just check post here. 
    1220           if ( ( 'post' == $post_type ) && !current_user_can('edit_post', $post_ID) ) 
    1221             return new IXR_Error(401, __('Sorry, you can not edit this post.')); 
     1214                $cap = ( $publish ) ? 'publish_posts' : 'edit_posts'; 
     1215                $error_message = __( 'Sorry, you are not allowed to publish posts on this blog.' ); 
     1216                $post_type = 'post'; 
     1217                if( !empty( $content_struct['post_type'] ) ) { 
     1218                        if( $content_struct['post_type'] == 'page' ) { 
     1219                                $cap = ( $publish ) ? 'publish_pages' : 'edit_pages'; 
     1220                                $error_message = __( 'Sorry, you are not allowed to publish pages on this blog.' ); 
     1221                                $post_type = 'page'; 
     1222                        } 
     1223                        elseif( $content_type['post_type'] == 'post' ) { 
     1224                                // This is the default, no changes needed 
     1225                        } 
     1226                        else { 
     1227                                // No other post_type values are allowed here 
     1228                                return new IXR_Error( 401, __( 'Invalid post type.' ) ); 
     1229                        } 
     1230                } 
     1231 
     1232                if( !current_user_can( $cap ) ) { 
     1233                        return new IXR_Error( 401, $error_message ); 
     1234                } 
    12221235 
    12231236          $postdata = wp_get_single_post($post_ID, ARRAY_A);