Ticket #4770: ping-xmlrpc.php.diff

File ping-xmlrpc.php.diff, 1.2 KB (added by josephscott, 5 years ago)

fix another typo in metaWeblog.editPost and remove duplicate code.

  • xmlrpc.php

     
    10231023 
    10241024                if(isset($content_struct["mt_allow_pings"])) { 
    10251025                        if(!is_numeric($content_struct["mt_allow_pings"])) { 
    1026                                 switch($content["mt_allow_pings"]) { 
     1026                                switch($content_struct['mt_allow_pings']) { 
    10271027                                        case "closed": 
    10281028                                                $ping_status = "closed"; 
    10291029                                                break;   
     
    12331233 
    12341234                if(isset($content_struct["mt_allow_pings"])) { 
    12351235                        if(!is_numeric($content_struct["mt_allow_pings"])) { 
    1236                                 switch($content["mt_allow_pings"]) { 
     1236                                switch($content_struct["mt_allow_pings"]) { 
    12371237                                        case "closed": 
    12381238                                                $ping_status = "closed"; 
    12391239                                                break;   
     
    12601260                        } 
    12611261                } 
    12621262 
    1263                 // Only set ping_status if it was provided. 
    1264                 if(isset($content_struct["mt_allow_pings"])) { 
    1265                         switch((int) $content_struct["mt_allow_pings"]) { 
    1266                                 case 0: 
    1267                                         $ping_status = "closed"; 
    1268                                         break; 
    1269                                 case 1: 
    1270                                         $ping_status = "open"; 
    1271                                         break; 
    1272                         } 
    1273                 } 
    1274  
    12751263          $post_title = $content_struct['title']; 
    12761264          $post_content = apply_filters( 'content_save_pre', $content_struct['description'] ); 
    12771265          $catnames = $content_struct['categories'];