Fix for bug #0000023: import-mt will no longer confuse multiple dashes in a post with the seperator marking a new entry.

git-svn-id: https://develop.svn.wordpress.org/trunk@1431 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
jverber 2004-06-16 16:19:56 +00:00
parent 150265dd4e
commit dd3ac2c56f
1 changed files with 4 additions and 3 deletions

View File

@ -66,9 +66,10 @@ set_magic_quotes_runtime(0);
$datalines = file(MTEXPORT); // Read the file into an array
$importdata = implode('', $datalines); // squish it
$importdata = preg_replace("/(\r\n|\n|\r)/", "\n", $importdata);
$importdata = preg_replace("/--------\nAUTHOR/", "--MT-ENTRY--\nAUTHOR", $importdata);
$authors = array();
$temp = array();
$posts = explode("--------", $importdata);
$posts = explode("--MT-ENTRY--", $importdata);
function users_form($n) {
global $wpdb, $testing;
@ -175,8 +176,8 @@ for ($x = 1; $x < $y; $x++) {
$datalines = file(MTEXPORT); // Read the file into an array
$importdata = implode('', $datalines); // squish it
$importdata = preg_replace("/(\r\n|\n|\r)/", "\n", $importdata);
$posts = explode("--------", $importdata);
$importdata = preg_replace("/--------\nAUTHOR/", "--MT-ENTRY--\nAUTHOR", $importdata);
$posts = explode("--MT-ENTRY--", $importdata);
$i = -1;
echo "<ol>";
foreach ($posts as $post) { if ('' != trim($post)) {