WordPress.org

Make WordPress Core

Ticket #16474: export.diff

File export.diff, 1.2 KB (added by niallkennedy, 5 years ago)

change string treatments for static strings

  • export.php

     
    4949        } else { 
    5050                $post_types = get_post_types( array( 'can_export' => true ) ); 
    5151                $esses = array_fill( 0, count($post_types), '%s' ); 
    52                 $where = $wpdb->prepare( "{$wpdb->posts}.post_type IN (". implode(',',$esses) .")", $post_types ); 
     52                $where = $wpdb->prepare( "{$wpdb->posts}.post_type IN (". implode(',',$esses) .')', $post_types ); 
    5353        } 
    5454 
    5555        if ( $args['status'] && ( 'post' == $args['content'] || 'page' == $args['content'] ) ) 
     
    123123                        $str = utf8_encode( $str ); 
    124124 
    125125                // $str = ent2ncr(esc_html($str)); 
    126                 $str = "<![CDATA[$str" . ( ( substr( $str, -1 ) == ']' ) ? ' ' : '') . "]]>"; 
     126                $str = "<![CDATA[$str" . ( ( substr( $str, -1 ) == ']' ) ? ' ' : '') . ']]>'; 
    127127 
    128128                return $str; 
    129129        } 
     
    348348 
    349349        // fetch 20 posts at a time rather than loading the entire table into memory 
    350350        while ( $next_posts = array_splice( $post_ids, 0, 20 ) ) { 
    351         $where = "WHERE ID IN (" . join( ',', $next_posts ) . ")"; 
     351        $where = 'WHERE ID IN (' . join( ',', $next_posts ) . ')'; 
    352352        $posts = $wpdb->get_results( "SELECT * FROM {$wpdb->posts} $where" ); 
    353353 
    354354        // Begin Loop