Changeset 1196
- Timestamp:
- 02/05/08 15:34:44 (10 months ago)
- Files:
-
- trunk/wp-admin/install-helper.php (modified) (1 diff)
- trunk/wp-includes/class-IXR.php (modified) (6 diffs)
- trunk/wp-includes/pluggable.php (modified) (1 diff)
- trunk/wp-includes/version.php (modified) (1 diff)
- trunk/xmlrpc.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/install-helper.php
r810 r1196 1 1 <?php 2 require_once( '../wp-config.php');2 require_once(dirname(dirname(__FILE__)).'/wp-config.php'); 3 3 $debug = 0; 4 4 trunk/wp-includes/class-IXR.php
r463 r1196 1 1 <?php 2 /* 2 /* 3 3 IXR - The Inutio XML-RPC Library - (c) Incutio Ltd 2002-2005 4 4 Version 1.7 (beta) - Simon Willison, 23rd May 2005 … … 48 48 // If it is a normal PHP object convert it in to a struct 49 49 if (is_object($this->data)) { 50 50 51 51 $this->data = get_object_vars($this->data); 52 52 return 'struct'; … … 255 255 } 256 256 $this->_currentTagContents = ''; 257 } 257 } 258 258 } 259 259 … … 380 380 'specVersion' => 1 381 381 ), 382 ); 382 ); 383 383 } 384 384 function getCapabilities($args) { … … 585 585 </value> 586 586 </fault> 587 </methodResponse> 587 </methodResponse> 588 588 589 589 EOD; … … 659 659 ); 660 660 $this->addCallback( 661 'system.methodSignature', 662 'this:methodSignature', 663 array('array', 'string'), 661 'system.methodSignature', 662 'this:methodSignature', 663 array('array', 'string'), 664 664 'Returns an array describing the return type and required parameters of a method' 665 665 ); 666 666 $this->addCallback( 667 'system.getCapabilities', 668 'this:getCapabilities', 669 array('struct'), 667 'system.getCapabilities', 668 'this:getCapabilities', 669 array('struct'), 670 670 'Returns a struct describing the XML-RPC specifications supported by this server' 671 671 ); 672 672 $this->addCallback( 673 'system.listMethods', 674 'this:listMethods', 675 array('array'), 673 'system.listMethods', 674 'this:listMethods', 675 array('array'), 676 676 'Returns an array of available methods on this server' 677 677 ); 678 678 $this->addCallback( 679 'system.methodHelp', 680 'this:methodHelp', 681 array('string', 'string'), 679 'system.methodHelp', 680 'this:methodHelp', 681 array('string', 'string'), 682 682 'Returns a documentation string for the specified method' 683 683 ); trunk/wp-includes/pluggable.php
r1172 r1196 249 249 // Set the from name and email 250 250 $phpmailer->From = apply_filters( 'wp_mail_from', $from_email ); 251 $phpmailer->Sender = apply_filters( 'wp_mail_from', $from_email );252 251 $phpmailer->FromName = apply_filters( 'wp_mail_from_name', $from_name ); 253 252 trunk/wp-includes/version.php
r1192 r1196 3 3 // This holds the version number in a separate file so we can bump it without cluttering the SVN 4 4 5 $wp_version = '2.3. 2';6 $wpmu_version = '1.3. 2';5 $wp_version = '2.3.3'; 6 $wpmu_version = '1.3.3'; 7 7 $wp_db_version = 6124; 8 8 trunk/xmlrpc.php
r1194 r1196 989 989 return $this->error; 990 990 } 991 992 $cap = ($publish) ? 'publish_posts' : 'edit_posts';993 991 $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 ); 1004 1013 } 1005 1014 … … 1201 1210 return $this->error; 1202 1211 } 1203 1204 1212 $user = set_current_user(0, $user_login); 1205 1213 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 } 1222 1235 1223 1236 $postdata = wp_get_single_post($post_ID, ARRAY_A);
