diff options
author | redmatrix <redmatrix@redmatrix.me> | 2015-11-11 19:42:52 +1100 |
---|---|---|
committer | redmatrix <redmatrix@redmatrix.me> | 2015-11-11 19:42:52 +1100 |
commit | bc7c0ed844711e81c4bc642e3024849195a48421 (patch) | |
tree | a2366c48e0dae047b052283cc44284224369c8cd | |
parent | ac9250fc4ad7f99382c1891619413c50a9097b62 (diff) | |
parent | 10ccdbacba928bc5dd50176d1a72d480985d5df8 (diff) | |
download | volse-hubzilla-bc7c0ed844711e81c4bc642e3024849195a48421.tar.gz volse-hubzilla-bc7c0ed844711e81c4bc642e3024849195a48421.tar.bz2 volse-hubzilla-bc7c0ed844711e81c4bc642e3024849195a48421.zip |
Merge pull request #143 from kenrestivo/allow-importing-by-proxy
Bust out import_account() into a separate function
-rw-r--r-- | mod/import.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/mod/import.php b/mod/import.php index 72d8f92e9..a33cf339b 100644 --- a/mod/import.php +++ b/mod/import.php @@ -9,11 +9,12 @@ require_once('include/identity.php'); require_once('include/import.php'); -function import_post(&$a) { +function import_account(&$a, $account_id) { - $account_id = get_account_id(); - if(! $account_id) + if(! $account_id){ + logger("import_account: No account ID supplied"); return; + } $max_identities = account_service_class_fetch($account_id,'total_identities'); $max_friends = account_service_class_fetch($account_id,'total_channels'); @@ -493,6 +494,15 @@ function import_post(&$a) { } +function import_post(&$a) { + + $account_id = get_account_id(); + if(! $account_id) + return; + + import_account($a, $account_id); +} + function import_content(&$a) { if(! get_account_id()) { |