From 55f34b811fef1f5e834fbcc65e41f6748e49ffd1 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 27 Dec 2011 23:10:04 +0400 Subject: implement experimental personal data import --- classes/dlg.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'classes/dlg.php') diff --git a/classes/dlg.php b/classes/dlg.php index 2d1cb9cc5..55eb5e37e 100644 --- a/classes/dlg.php +++ b/classes/dlg.php @@ -954,5 +954,28 @@ class Dlg extends Protected_Handler { return; } + function dataImport() { + header("Content-Type: text/html"); # required for iframe + + print "
"; + + if (is_file($_FILES['export_file']['tmp_name'])) { + + perform_data_import($this->link, $_FILES['export_file']['tmp_name'], $_SESSION['uid']); + + } else { + print "

" . T_sprintf("Could not upload file. You might need to adjust upload_max_filesize + in PHP.ini (current value = %s)", ini_get("upload_max_filesize")) . " or use CLI import tool.

"; + + } + + print ""; + + print "
"; + + } + } ?> -- cgit v1.2.3