blob: 5da9d00040d3bcb6c7ed0ca705962cb79d13d103 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
<?php
// Import a channel, either by direct file upload or via
// connection to original server.
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']);
$filetype = $_FILES['userfile']['type'];
if(($src) && (! $filesize)) {
logger('mod_import: empty file.');
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
}
function import_content(&$a) {
}
|