Changeset 6596

Show
Ignore:
Timestamp:
01/10/08 22:37:15 (9 months ago)
Author:
westi
Message:

Better xmlrpc field names. See #5569 props josephscott.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/xmlrpc.php

    r6594 r6596  
    11921192 
    11931193        $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"] ) { 
    11961197                case 'draft': 
    11971198                case 'private': 
    11981199                case 'publish': 
    1199                     $post_status = $content_struct['post_status']; 
     1200                    $post_status = $content_struct["{$post_type}_status"]; 
    12001201                    break; 
    12011202                case 'pending': 
    12021203                    // Pending is only valid for posts, not pages. 
    12031204                    if( $post_type === 'post' ) { 
    1204                         $post_status = $content_struct['post_status']; 
     1205                        $post_status = $content_struct["{$post_type}_status"]; 
    12051206                    } 
    12061207                    break; 
     
    15111512 
    15121513        $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"] ) { 
    15151516                case 'draft': 
    15161517                case 'private': 
    15171518                case 'publish': 
    1518                     $post_status = $content_struct['post_status']; 
     1519                    $post_status = $content_struct["{$post_type}_status"]; 
    15191520                    break; 
    15201521                case 'pending': 
    15211522                    // Pending is only valid for posts, not pages. 
    15221523                    if( $post_type === 'post' ) { 
    1523                         $post_status = $content_struct['post_status']; 
     1524                        $post_status = $content_struct["{$post_type}_status"]; 
    15241525                    } 
    15251526                    break;