WordPress.org

Make WordPress Core

Ticket #3405: xmlrpc.php.diff

File xmlrpc.php.diff, 740 bytes (added by swinton, 11 years ago)

Patchfile for xmlrpc.php (updated to support PHP 4)

  • xmlrpc.php

     
    566566            return new IXR_Error(500, 'Sorry, your entry could not be posted. Something wrong happened.');
    567567          }
    568568
     569    // Handle enclosures
     570    $enclosure = $content_struct['enclosure'];
     571    if (is_array($enclosure) && isset($enclosure['url'])
     572    && isset($enclosure['length']) && isset($enclosure['type'])) {
     573      add_post_meta($post_ID, 'enclosure',
     574        $enclosure['url'] . "\n" .
     575        $enclosure['length'] . "\n" .
     576        $enclosure['type']);
     577    }
     578
    569579          $this->attach_uploads( $post_ID, $post_content );
    570580
    571581          logIO('O', "Posted ! ID: $post_ID");