diff --git a/system/admin/admin.php b/system/admin/admin.php
index 00cc08d..859d7fe 100644
--- a/system/admin/admin.php
+++ b/system/admin/admin.php
@@ -616,6 +616,7 @@ function migrate($title, $time, $tags, $content, $url, $user, $source)
} else {
$post_content = '' . "\n" . '' . "\n\n" . $content;
}
+
if (!empty($post_title) && !empty($post_tag) && !empty($post_url) && !empty($post_content)) {
if (get_magic_quotes_gpc()) {
$post_content = stripslashes($post_content);
@@ -629,8 +630,31 @@ function migrate($title, $time, $tags, $content, $url, $user, $source)
file_put_contents($dir . $filename, print_r($post_content, true));
}
save_tag_i18n($post_tag, $post_tagmd);
+ // import images
+ if(count($images) > 0) {
+ foreach ($images as $image_url) {
+ $imagefile = basename($image_url);
+ if(!@copy($image_url,'content/images/'.$imagefile))
+ {
+ $errors= error_get_last();
+ echo "COPY ERROR: ".$errors['type'];
+ echo "
\n".$errors['message'];
+ } else {
+ echo "$imagefile copied from remote!
\n";
+ // $images_imported++;
+ }
+ }
+ }
+
$redirect = site_url() . 'admin/clear-cache';
header("Location: $redirect");
+ } else {
+ echo "