From be2b7c0b5f7f9b8080affbb4bc44c5adda18e82f Mon Sep 17 00:00:00 2001 From: redmatrix Date: Mon, 29 Feb 2016 19:31:52 -0800 Subject: abconfig --- mod/import.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'mod/import.php') diff --git a/mod/import.php b/mod/import.php index 184159585..0b239d822 100644 --- a/mod/import.php +++ b/mod/import.php @@ -341,6 +341,10 @@ function import_account(&$a, $account_id) { if($abooks) { foreach($abooks as $abook) { + $abconfig = null; + if(array_key_exists('abconfig',$abook) && is_array($abook['abconfig']) && count($abook['abconfig'])) + $abconfig = $abook['abconfig']; + unset($abook['abook_id']); unset($abook['abook_rating']); unset($abook['abook_rating_text']); @@ -382,6 +386,17 @@ function import_account(&$a, $account_id) { $friends ++; if(intval($abook['abook_feed'])) $feeds ++; + + if($abconfig) { + // @fixme does not handle sync of del_abconfig + foreach($abconfig as $abc) { + if($abc['chan'] === $channel['channel_hash']) + set_abconfig($abc['chan'],$abc['xchan'],$abc['cat'],$abc['k'],$abc['v']); + } + } + + + } } logger('import step 8'); -- cgit v1.2.3