From ce38350e003cc7c8925f2fe3054bc7fb277e29a0 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 31 Dec 2017 14:45:42 -0800 Subject: this should finish up hubzilla issue #113 --- include/channel.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'include/channel.php') diff --git a/include/channel.php b/include/channel.php index 2d40b7db6..b9adc588b 100644 --- a/include/channel.php +++ b/include/channel.php @@ -1982,12 +1982,17 @@ function get_channel_default_perms($uid) { } -function profiles_build_sync($channel_id) { +function profiles_build_sync($channel_id,$send = true) { $r = q("select * from profile where uid = %d", intval($channel_id) ); if($r) { - build_sync_packet($channel_id,array('profile' => $r)); + if($send) { + build_sync_packet($channel_id,array('profile' => $r)); + } + else { + return $r; + } } } -- cgit v1.2.3 From 02575f46a6d288cd2c1168bbbe52be2c7863cb46 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 20 Feb 2018 17:18:08 -0800 Subject: move the zot6 delivery to zot_fetch where it makes more sense. Exhaustively hand tested. --- include/channel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/channel.php') diff --git a/include/channel.php b/include/channel.php index b9adc588b..625ce16c8 100644 --- a/include/channel.php +++ b/include/channel.php @@ -2553,10 +2553,10 @@ function channel_remove($channel_id, $local = true, $unset_session = false) { q("DELETE FROM profile WHERE uid = %d", intval($channel_id)); q("DELETE FROM src WHERE src_channel_id = %d", intval($channel_id)); - $r = q("select resource_id FROM attach WHERE uid = %d", intval($channel_id)); + $r = q("select hash FROM attach WHERE uid = %d", intval($channel_id)); if($r) { foreach($r as $rv) { - attach_delete($channel_id,$rv['resource_id']); + attach_delete($channel_id,$rv['hash']); } } -- cgit v1.2.3 From 048a636315671b7e9aaf9152273d101994e37c43 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 23 Feb 2018 12:44:07 -0800 Subject: Usability and member experience: remove street address info from the default basic profile fields, mention that the site banner can be full HTML, mention on the techlevel setting that this also controls what additional features may be visible. --- include/channel.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/channel.php') diff --git a/include/channel.php b/include/channel.php index 625ce16c8..d1d41d378 100644 --- a/include/channel.php +++ b/include/channel.php @@ -1897,7 +1897,7 @@ function get_profile_fields_basic($filter = 0) { $profile_fields_basic = (($filter == 0) ? get_config('system','profile_fields_basic') : null); if(! $profile_fields_basic) - $profile_fields_basic = array('fullname','pdesc','chandesc','comms','gender','dob','dob_tz','address','locality','region','postal_code','country_name','marital','sexual','homepage','hometown','keywords','about','contact'); + $profile_fields_basic = array('fullname','pdesc','chandesc','comms','gender','dob','dob_tz','region','country_name','marital','sexual','homepage','hometown','keywords','about','contact'); $x = array(); if($profile_fields_basic) @@ -1912,7 +1912,7 @@ function get_profile_fields_advanced($filter = 0) { $basic = get_profile_fields_basic($filter); $profile_fields_advanced = (($filter == 0) ? get_config('system','profile_fields_advanced') : null); if(! $profile_fields_advanced) - $profile_fields_advanced = array('partner','howlong','politic','religion','likes','dislikes','interest','channels','music','book','film','tv','romance','employment','education'); + $profile_fields_advanced = array('address','locality','postal_code','partner','howlong','politic','religion','likes','dislikes','interest','channels','music','book','film','tv','romance','employment','education'); $x = array(); if($basic) -- cgit v1.2.3 From 3dd64e7916872d21122c8184abb80eaa5a79a3fc Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 23 Feb 2018 13:21:49 -0800 Subject: usability: click your own profile photo to change it instead of hunting it down in the profile edit navmenu. We still need work on the 'or use a photo from your albums' to use something like the photo selection widget in the post editor as you otherwise have to track down the 'use as profile photo' entry in the photo detail navmenu instead of just clicking an image. --- include/channel.php | 1 + 1 file changed, 1 insertion(+) (limited to 'include/channel.php') diff --git a/include/channel.php b/include/channel.php index d1d41d378..a8ddfa978 100644 --- a/include/channel.php +++ b/include/channel.php @@ -1449,6 +1449,7 @@ function profile_sidebar($profile, $block = 0, $show_connect = true, $zcard = fa '$reddress' => $reddress, '$rating' => '', '$contact_block' => $contact_block, + '$change_photo' => t('Change your profile photo'), '$editmenu' => profile_edit_menu($profile['uid']) )); -- cgit v1.2.3 From af46c192bf7c217b7348082cbcacd3ea4659fae3 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 4 Mar 2018 15:29:10 -0800 Subject: bugfix: unable to reset profile fields to defaults in admin/profs by emptying the textarea --- include/channel.php | 1 + 1 file changed, 1 insertion(+) (limited to 'include/channel.php') diff --git a/include/channel.php b/include/channel.php index a8ddfa978..204c1e64f 100644 --- a/include/channel.php +++ b/include/channel.php @@ -1897,6 +1897,7 @@ function is_public_profile() { function get_profile_fields_basic($filter = 0) { $profile_fields_basic = (($filter == 0) ? get_config('system','profile_fields_basic') : null); + if(! $profile_fields_basic) $profile_fields_basic = array('fullname','pdesc','chandesc','comms','gender','dob','dob_tz','region','country_name','marital','sexual','homepage','hometown','keywords','about','contact'); -- cgit v1.2.3 From f02314dfd877ab13852ae169d40dcbcc65344bfb Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 4 Mar 2018 17:36:52 -0800 Subject: fix some issues with friend suggestions on standalone sites with no 'suggestme' volunteers. This wrongly pulled up a site directory suggesting everybody on the site. While a better outcome than finding nobody, this does not fit with our ethical design goals. If there are no friends of friends, we will only suggest those who volunteer to be on the default suggestion list. Also do not attempt to load poco data from dead sites. --- include/channel.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include/channel.php') diff --git a/include/channel.php b/include/channel.php index 204c1e64f..a754d3504 100644 --- a/include/channel.php +++ b/include/channel.php @@ -1126,8 +1126,7 @@ function channel_export_items($channel_id, $start, $finish) { /** * @brief Loads a profile into the App structure. * - * The function requires a writeable copy of the main App structure, and the - * nickname of a valid channel. + * The function requires the nickname of a valid channel. * * Permissions of the current observer are checked. If a restricted profile is available * to the current observer, that will be loaded instead of the channel default profile. -- cgit v1.2.3