From 3ba267d0c06bb4a3982e3d62f1d592be27e8fa17 Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 19 Feb 2013 22:55:34 -0800 Subject: unset auto increment keys on import --- mod/import.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mod/import.php b/mod/import.php index a2b5132db..f35ca149b 100644 --- a/mod/import.php +++ b/mod/import.php @@ -121,6 +121,7 @@ function import_post(&$a) { $profiles = $data['profile']; if($profiles) { foreach($profiles as $profile) { + unset($profile['id']); $profile['aid'] = get_account_id(); $profile['uid'] = $channel['channel_id']; @@ -154,6 +155,7 @@ function import_post(&$a) { $hubloc['hubloc_flags'] = ($hubloc['hubloc_flags'] ^ HUBLOC_FLAGS_PRIMARY); if(! zot_gethub($arr)) { + unset($hubloc['hubloc_id']); dbesc_array($hubloc); $r = dbq("INSERT INTO hubloc (`" @@ -236,6 +238,7 @@ function import_post(&$a) { $abooks = $data['abook']; if($abooks) { foreach($abooks as $abook) { + unset($abook['abook_id']); $abook['abook_account'] = get_account_id(); $abook['abook_channel'] = $channel['channel_id']; dbesc_array($abook); -- cgit v1.2.3