Better xmlrpc field names. See #5569 props josephscott.

git-svn-id: http://svn.automattic.com/wordpress/trunk@6596 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2008-01-10 22:37:15 +00:00
parent bdbdeb1e7c
commit c75a848b4c
1 changed files with 9 additions and 8 deletions

View File

@ -1191,17 +1191,18 @@ class wp_xmlrpc_server extends IXR_Server {
$post_content = apply_filters( 'content_save_pre', $content_struct['description'] );
$post_status = $publish ? 'publish' : 'draft';
if( isset( $content_struct['post_status'] ) ) {
switch( $content_struct['post_status'] ) {
if( isset( $content_struct["{$post_type}_status"] ) ) {
switch( $content_struct["{$post_type}_status"] ) {
case 'draft':
case 'private':
case 'publish':
$post_status = $content_struct['post_status'];
$post_status = $content_struct["{$post_type}_status"];
break;
case 'pending':
// Pending is only valid for posts, not pages.
if( $post_type === 'post' ) {
$post_status = $content_struct['post_status'];
$post_status = $content_struct["{$post_type}_status"];
}
break;
default:
@ -1510,17 +1511,17 @@ class wp_xmlrpc_server extends IXR_Server {
$post_more = $content_struct['mt_text_more'];
$post_status = $publish ? 'publish' : 'draft';
if( isset( $content_struct['post_status'] ) ) {
switch( $content_struct['post_status'] ) {
if( isset( $content_struct["{$post_type}_status"] ) ) {
switch( $content_struct["{$post_type}_status"] ) {
case 'draft':
case 'private':
case 'publish':
$post_status = $content_struct['post_status'];
$post_status = $content_struct["{$post_type}_status"];
break;
case 'pending':
// Pending is only valid for posts, not pages.
if( $post_type === 'post' ) {
$post_status = $content_struct['post_status'];
$post_status = $content_struct["{$post_type}_status"];
}
break;
default: