Ticket #5569: xmlrpc.php.2.diff
File xmlrpc.php.2.diff, 1.7 KB (added by , 17 years ago) |
---|
-
xmlrpc.php
1191 1191 $post_content = apply_filters( 'content_save_pre', $content_struct['description'] ); 1192 1192 1193 1193 $post_status = $publish ? 'publish' : 'draft'; 1194 if( isset( $content_struct['post_status'] ) ) { 1195 switch( $content_struct['post_status'] ) { 1194 1195 if( isset( $content_struct["{$post_type}_status"] ) ) { 1196 switch( $content_struct["{$post_type}_status"] ) { 1196 1197 case 'draft': 1197 1198 case 'private': 1198 1199 case 'publish': 1199 $post_status = $content_struct[ 'post_status'];1200 $post_status = $content_struct["{$post_type}_status"]; 1200 1201 break; 1201 1202 case 'pending': 1202 1203 // Pending is only valid for posts, not pages. 1203 1204 if( $post_type === 'post' ) { 1204 $post_status = $content_struct[ 'post_status'];1205 $post_status = $content_struct["{$post_type}_status"]; 1205 1206 } 1206 1207 break; 1207 1208 default: … … 1510 1511 $post_more = $content_struct['mt_text_more']; 1511 1512 1512 1513 $post_status = $publish ? 'publish' : 'draft'; 1513 if( isset( $content_struct[ 'post_status'] ) ) {1514 switch( $content_struct[ 'post_status'] ) {1514 if( isset( $content_struct["{$post_type}_status"] ) ) { 1515 switch( $content_struct["{$post_type}_status"] ) { 1515 1516 case 'draft': 1516 1517 case 'private': 1517 1518 case 'publish': 1518 $post_status = $content_struct[ 'post_status'];1519 $post_status = $content_struct["{$post_type}_status"]; 1519 1520 break; 1520 1521 case 'pending': 1521 1522 // Pending is only valid for posts, not pages. 1522 1523 if( $post_type === 'post' ) { 1523 $post_status = $content_struct[ 'post_status'];1524 $post_status = $content_struct["{$post_type}_status"]; 1524 1525 } 1525 1526 break; 1526 1527 default: