aboutsummaryrefslogtreecommitdiffstats
path: root/mod/import.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/import.php')
-rw-r--r--mod/import.php34
1 files changed, 33 insertions, 1 deletions
diff --git a/mod/import.php b/mod/import.php
index 394a2c259..5da9d0004 100644
--- a/mod/import.php
+++ b/mod/import.php
@@ -6,6 +6,9 @@
function import_post(&$a) {
+
+ $sieze = ((x($_REQUEST,'make_primary')) ? intval($_REQUEST['make_primary']) : 0);
+
$src = $_FILES['userfile']['tmp_name'];
$filename = basename($_FILES['userfile']['name']);
$filesize = intval($_FILES['userfile']['size']);
@@ -14,11 +17,40 @@ function import_post(&$a) {
if(($src) && (! $filesize)) {
logger('mod_import: empty file.');
- notice( t('Imported file is empty.');
+ notice( t('Imported file is empty.') . EOL);
return;
}
+ if(! $src) {
+ $old_address = ((x($_REQUEST,'old_address')) ? $_REQUEST['old_address'] : '');
+ if(! $old_address) {
+ logger('mod_import: nothing to import.');
+ notice( t('Nothing to import.') . EOL);
+ return;
+ }
+
+ // Connect to API of old server with credentials given and suck in the data we need
+
+
+ }
+
+
+
+ // import channel
+
+ // import contacts
+
+
+
+
+
+ if($sieze) {
+ // notify old server that it is no longer primary.
+
+ }
+
+ // send out refresh requests
}