Ticket #8470: large-export-fix-no-indent.diff
File large-export-fix-no-indent.diff, 1.6 KB (added by , 15 years ago) |
---|
-
wp-admin/includes/export.php
30 30 31 31 $filename = 'wordpress.' . date('Y-m-d') . '.xml'; 32 32 33 set_time_limit( 0 ); 34 33 35 header('Content-Description: File Transfer'); 34 36 header("Content-Disposition: attachment; filename=$filename"); 35 37 header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true); … … 187 189 * 188 190 * @since unknown 189 191 */ 190 function wxr_post_taxonomy() { 192 function wxr_post_taxonomy() { 191 193 $categories = get_the_category(); 192 194 $tags = get_the_tags(); 193 195 $the_list = ''; … … 262 264 $wp_query->in_the_loop = true; // Fake being in the loop. 263 265 // fetch 20 posts at a time rather than loading the entire table into memory 264 266 while ( $next_posts = array_splice($post_ids, 0, 20) ) { 267 268 // reset time limit 269 set_time_limit( 0 ); 270 // unset wpdb->queries as this is growing with each query. 271 unset($wpdb->queries); 272 $wpdb->queries=array(); 273 265 274 $where = "WHERE ID IN (".join(',', $next_posts).")"; 266 275 $posts = $wpdb->get_results("SELECT * FROM $wpdb->posts $where ORDER BY post_date_gmt ASC"); 267 276 foreach ($posts as $post) { … … 325 334 </wp:comment> 326 335 <?php } } ?> 327 336 </item> 328 <?php } } } ?> 337 <?php 338 // free some memory 339 unset( $comments ); 340 unset( $postmeta ); 341 unset( $post ); 342 } 343 // flush the collected data to the browser 344 flush(); 345 ob_flush(); 346 unset( $posts ); 347 } } ?> 329 348 </channel> 330 349 </rss> 331 350 <?php