diff options
author | ken restivo <ken@restivo.org> | 2015-11-10 23:07:28 -0800 |
---|---|---|
committer | ken restivo <ken@restivo.org> | 2015-11-10 23:07:28 -0800 |
commit | 10ccdbacba928bc5dd50176d1a72d480985d5df8 (patch) | |
tree | e0a4c50754712507aed840fe84d24d4ff2798044 | |
parent | d68357340232502cbf365187cc260565e327e33e (diff) | |
download | volse-hubzilla-10ccdbacba928bc5dd50176d1a72d480985d5df8.tar.gz volse-hubzilla-10ccdbacba928bc5dd50176d1a72d480985d5df8.tar.bz2 volse-hubzilla-10ccdbacba928bc5dd50176d1a72d480985d5df8.zip |
Bust out import_account() into a separate function to allow importing accounts by proxy, i.e. for admins to import a channel on behalf of a user.
-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()) { |