change AbConfig to use channel_id instead of channel_hash; which was a mistake in retrospect

This commit is contained in:
redmatrix
2016-06-23 18:12:26 -07:00
parent e5c66d94f2
commit b19bbf5473
7 changed files with 30 additions and 32 deletions

View File

@@ -345,7 +345,7 @@ class Connedit extends \Zotlabs\Web\Controller {
unset($clone['abook_account']);
unset($clone['abook_channel']);
$abconfig = load_abconfig($channel['channel_hash'],$clone['abook_xchan']);
$abconfig = load_abconfig($channel['channel_id'],$clone['abook_xchan']);
if($abconfig)
$clone['abconfig'] = $abconfig;

View File

@@ -43,7 +43,7 @@ class Follow extends \Zotlabs\Web\Controller {
unset($clone['abook_account']);
unset($clone['abook_channel']);
$abconfig = load_abconfig($channel['channel_hash'],$clone['abook_xchan']);
$abconfig = load_abconfig($channel['channel_id'],$clone['abook_xchan']);
if($abconfig)
$clone['abconfig'] = $abconfig;

View File

@@ -389,8 +389,7 @@ class Import extends \Zotlabs\Web\Controller {
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']);
set_abconfig($channel['channel_id'],$abc['xchan'],$abc['cat'],$abc['k'],$abc['v']);
}
}