summaryrefslogtreecommitdiff
path: root/init.php
diff options
context:
space:
mode:
Diffstat (limited to 'init.php')
-rw-r--r--init.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/init.php b/init.php
index 0cdbf8c..f0a4f48 100644
--- a/init.php
+++ b/init.php
@@ -110,6 +110,9 @@ class Data_Migration extends Plugin {
if ($row = $sth->fetch()) {
$owner_uid = $row['id'];
+ if (stripos($output_file, ".zip") === FALSE)
+ $output_file = $output_file . ".zip";
+
Debug::log("exporting articles of user $user to $output_file...");
if ($only_marked)
@@ -151,7 +154,10 @@ class Data_Migration extends Plugin {
break;
}
- $zip->close();
+ if ($zip->close() !== TRUE) {
+ Debug::log("write error while saving data to $output_file");
+ exit(3);
+ }
Debug::log("exported $total_processed articles to $output_file.");