From 732dfa63c783fe2e965d1051e0dea587b17aafa6 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Thu, 23 Feb 2017 20:27:12 -0800 Subject: deleting profile vcard entries was pretty well borked --- Zotlabs/Module/Profiles.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Module/Profiles.php') diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php index da8b16b00..d6c9d6570 100644 --- a/Zotlabs/Module/Profiles.php +++ b/Zotlabs/Module/Profiles.php @@ -317,8 +317,10 @@ class Profiles extends \Zotlabs\Web\Controller { $hide_friends = ((intval($_POST['hide_friends'])) ? 1: 0); +// start fresh and create a new vcard. TODO: preserve the original guid or whatever else needs saving +// $orig_vcard = (($orig[0]['profile_vcard']) ? \Sabre\VObject\Reader::read($orig[0]['profile_vcard']) : null); - $orig_vcard = (($orig[0]['profile_vcard']) ? \Sabre\VObject\Reader::read($orig[0]['profile_vcard']) : null); + $orig_vcard = null; $channel = \App::get_channel(); @@ -700,7 +702,7 @@ class Profiles extends \Zotlabs\Web\Controller { $vc = $r[0]['profile_vcard']; $vctmp = (($vc) ? \Sabre\VObject\Reader::read($vc) : null); - $vcard = (($vctmp) ? get_vcard_array($vctmp,$contact['abook_id']) : [] ); + $vcard = (($vctmp) ? get_vcard_array($vctmp,$r[0]['id']) : [] ); $f = get_config('system','birthday_input_format'); if(! $f) -- cgit v1.2.3