aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Profiles.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-01-15 19:51:14 -0800
committerzotlabs <mike@macgirvin.com>2017-01-15 19:51:14 -0800
commitc32bc9dda4dc08f2e4e72dc91c78457a0383244e (patch)
treef0fa883d753751fc9508bc98ff8e0bbb8540caaa /Zotlabs/Module/Profiles.php
parentd7080defd3b9d72a6e7988ce72a0ef2cdd39bb70 (diff)
downloadvolse-hubzilla-c32bc9dda4dc08f2e4e72dc91c78457a0383244e.tar.gz
volse-hubzilla-c32bc9dda4dc08f2e4e72dc91c78457a0383244e.tar.bz2
volse-hubzilla-c32bc9dda4dc08f2e4e72dc91c78457a0383244e.zip
more integration of vcard and profiles
Diffstat (limited to 'Zotlabs/Module/Profiles.php')
-rw-r--r--Zotlabs/Module/Profiles.php34
1 files changed, 31 insertions, 3 deletions
diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php
index 72a056963..e166c3c19 100644
--- a/Zotlabs/Module/Profiles.php
+++ b/Zotlabs/Module/Profiles.php
@@ -319,10 +319,38 @@ class Profiles extends \Zotlabs\Web\Controller {
$orig_vcard = (($orig[0]['profile_vcard']) ? \Sabre\VObject\Reader::read($orig[0]['profile_vcard']) : null);
- $_REQUEST['fn'] = $name;
- $_REQUEST['title'] = $pdesc;
+ $channel = \App::get_channel();
+
+ $default_vcard_cat = ((defined('DEFAULT_VCARD_CAT')) ? DEFAULT_VCARD_CAT : 'HOME');
+
+ $defcard = [
+ 'fn' => $name,
+ 'title' => $pdesc,
+ 'photo' => $channel['xchan_photo_l'],
+ 'adr' => [],
+ 'adr_type' => [ $default_vcard_cat ],
+ 'tel' => [],
+ 'tel_type' => [ $default_vcard_cat ],
+ 'email' => [],
+ 'email_type' => [ $default_vcard_cat ],
+ 'impp' => [],
+ 'impp_type' => [ $default_vcard_cat ],
+ 'url' => [],
+ 'url_type' => [ $default_vcard_cat ]
+ ];
+
+ $defcard['adr'][] = [
+ 0 => '',
+ 1 => '',
+ 2 => $address,
+ 3 => $locality,
+ 4 => $region,
+ 5 => $postal_code,
+ 6 => $country_name
+ ];
+
- $profile_vcard = update_vcard($_REQUEST,$orig_vcard);
+ $profile_vcard = update_vcard($defcard,$orig_vcard);
require_once('include/text.php');