Ticket #5460: 5460_get_entries.diff
File 5460_get_entries.diff, 1.4 KB (added by , 17 years ago) |
---|
-
C:/xampp/htdocs/wordpress_trunk/wp-admin/import/wordpress.php
116 116 $this->tags[] = $tag[1]; 117 117 continue; 118 118 } 119 if ( false !== strpos($importline, '<item>') ) { 119 120 /* 121 * need to handle the special case when </item><item> are on the same line 122 * eg: <item> 123 * ...... 124 * </item> <item> 125 * ...... 126 * </item> 127 */ 128 $item_begin = ( false !== strpos($importline, '<item>') ); 129 $item_end = ( false !== strpos($importline, '</item>') ); 130 131 if ( $item_end && $item_begin ) { 132 if ($process_post_func) 133 call_user_func($process_post_func, $this->post); 120 134 $this->post = ''; 121 135 $doing_entry = true; 136 continue; 137 } else if ( $item_begin ) { 138 $this->post = ''; 139 $doing_entry = true; 122 140 continue; 123 } 124 if ( false !== strpos($importline, '</item>') ) { 125 $doing_entry = false; 141 } else if ( $item_end ) { 126 142 if ($process_post_func) 127 143 call_user_func($process_post_func, $this->post); 144 $doing_entry = false; 128 145 continue; 129 146 } 147 130 148 if ( $doing_entry ) { 131 149 $this->post .= $importline . "\n"; 132 150 }