aboutsummaryrefslogtreecommitdiffstats
path: root/mod/import.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-12 15:29:34 -0800
committerfriendica <info@friendica.com>2013-01-12 15:29:34 -0800
commit5cb970963b4c5c9d7c8169451470072e0d149f93 (patch)
tree766ea6508b61d9371798d0bdc4d672ec57965400 /mod/import.php
parent303c24b261f2cadbd89e1ea04218b85d8a4b130e (diff)
downloadvolse-hubzilla-5cb970963b4c5c9d7c8169451470072e0d149f93.tar.gz
volse-hubzilla-5cb970963b4c5c9d7c8169451470072e0d149f93.tar.bz2
volse-hubzilla-5cb970963b4c5c9d7c8169451470072e0d149f93.zip
fill in the basic outline of what needs to happen on importation
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
}