summaryrefslogtreecommitdiff
path: root/classes/dlg.php
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2011-12-27 23:10:04 +0400
committerAndrew Dolgov <[email protected]>2011-12-27 23:10:04 +0400
commit55f34b811fef1f5e834fbcc65e41f6748e49ffd1 (patch)
tree253925b896709503897a6fb108bdcb07cb28e6c0 /classes/dlg.php
parent566faa14760112f81eea78fe441d5adc1b872da1 (diff)
implement experimental personal data import
Diffstat (limited to 'classes/dlg.php')
-rw-r--r--classes/dlg.php23
1 files changed, 23 insertions, 0 deletions
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 "<div style='text-align : center'>";
+
+ if (is_file($_FILES['export_file']['tmp_name'])) {
+
+ perform_data_import($this->link, $_FILES['export_file']['tmp_name'], $_SESSION['uid']);
+
+ } else {
+ print "<p>" . 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.</p>";
+
+ }
+
+ print "<button dojoType=\"dijit.form.Button\"
+ onclick=\"dijit.byId('dataImportDlg').hide()\">".
+ __('Close this window')."</button>";
+
+ print "</div>";
+
+ }
+
}
?>