aboutsummaryrefslogtreecommitdiffstats
path: root/mod/connections.php
diff options
context:
space:
mode:
authorThomas Willingham <founder@kakste.com>2013-07-03 16:10:58 +0100
committerThomas Willingham <founder@kakste.com>2013-07-03 16:10:58 +0100
commitd065135d909bf876f4c305d303de7642657f7e3e (patch)
treec569ec28535fe5e91ab29dffe67c9a74f11fece2 /mod/connections.php
parentd1cae2da2abc3a602f682114bc02cce08a7e7578 (diff)
parent429ebabfd98240fe7d69ba81879ee35769af305f (diff)
downloadvolse-hubzilla-d065135d909bf876f4c305d303de7642657f7e3e.tar.gz
volse-hubzilla-d065135d909bf876f4c305d303de7642657f7e3e.tar.bz2
volse-hubzilla-d065135d909bf876f4c305d303de7642657f7e3e.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod/connections.php')
-rw-r--r--mod/connections.php15
1 files changed, 8 insertions, 7 deletions
diff --git a/mod/connections.php b/mod/connections.php
index a53107dcf..89c0bcbc0 100644
--- a/mod/connections.php
+++ b/mod/connections.php
@@ -63,10 +63,10 @@ function connections_post(&$a) {
call_hooks('contact_edit_post', $_POST);
- $profile_id = intval($_POST['profile-assign']);
+ $profile_id = $_POST['profile-assign'];
if($profile_id) {
- $r = q("SELECT `id` FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1",
- intval($profile_id),
+ $r = q("SELECT profile_guid FROM profile WHERE profile_guid = '%s' AND `uid` = %d LIMIT 1",
+ dbesc($profile_id),
intval(local_user())
);
if(! count($r)) {
@@ -99,9 +99,9 @@ function connections_post(&$a) {
$abook_flags = ( $abook_flags ^ ABOOK_FLAG_PENDING );
}
- $r = q("UPDATE abook SET abook_profile = %d, abook_my_perms = %d , abook_closeness = %d, abook_flags = %d
+ $r = q("UPDATE abook SET abook_profile = '%s', abook_my_perms = %d , abook_closeness = %d, abook_flags = %d
where abook_id = %d AND abook_channel = %d LIMIT 1",
- intval($profile_id),
+ dbesc($profile_id),
intval($abook_my_perms),
intval($closeness),
intval($abook_flags),
@@ -405,7 +405,7 @@ function connections_content(&$a) {
'$noperm_desc' => (((! $self) && (! $contact['abook_my_perms'])) ? t('This may be appropriate based on your <a href="settings">privacy settings</a>, though you may wish to review the "Advanced Permissions"') : ''),
'$submit' => t('Submit'),
'$lbl_vis1' => t('Profile Visibility'),
- '$lbl_vis2' => sprintf( t('Please choose the profile you would like to display to %s when viewing your profile securely.'), $contact['name']),
+ '$lbl_vis2' => sprintf( t('Please choose the profile you would like to display to %s when viewing your profile securely.'), $contact['xchan_name']),
'$lbl_info1' => t('Contact Information / Notes'),
'$infedit' => t('Edit contact notes'),
'$close' => $contact['abook_closeness'],
@@ -438,7 +438,8 @@ function connections_content(&$a) {
'$updpub' => t('Update public posts'),
'$last_update' => $last_update,
'$udnow' => t('Update now'),
-// '$profile_select' => contact_profile_assign($contact['profile_id'],(($contact['network'] !== NETWORK_DFRN) ? true : false)),
+ '$profile_select' => contact_profile_assign($contact['abook_profile']),
+ '$multiprofs' => feature_enabled(local_user(),'multi_profiles'),
'$contact_id' => $contact['abook_id'],
'$block_text' => (($contact['blocked']) ? t('Unblock') : t('Block') ),
'$ignore_text' => (($contact['readonly']) ? t('Unignore') : t('Ignore') ),