1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-01-06 20:09:14 +00:00

implement experimental personal data import

This commit is contained in:
Andrew Dolgov
2011-12-27 23:10:04 +04:00
parent 566faa1476
commit 55f34b811f
5 changed files with 293 additions and 11 deletions

View File

@@ -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>";
}
}
?>