diff options
author | Wave <wave72@users.noreply.github.com> | 2015-11-06 09:09:58 +0100 |
---|---|---|
committer | Wave <wave72@users.noreply.github.com> | 2015-11-06 09:09:58 +0100 |
commit | 30d083ac3cbdf36171cfee7b892271b9b587325c (patch) | |
tree | f2f63728f86f8336330d31ee8edf2fcd742dc71e /mod/connedit.php | |
parent | 50cf095c000813d0b1408d929c1fa7422b131a3d (diff) | |
parent | 4ca0c2cfd14df5e2b6e9c7f59a10628f7653d6a4 (diff) | |
download | volse-hubzilla-30d083ac3cbdf36171cfee7b892271b9b587325c.tar.gz volse-hubzilla-30d083ac3cbdf36171cfee7b892271b9b587325c.tar.bz2 volse-hubzilla-30d083ac3cbdf36171cfee7b892271b9b587325c.zip |
Merge pull request #2 from redmatrix/master
Update to latest hubzilla
Diffstat (limited to 'mod/connedit.php')
-rw-r--r-- | mod/connedit.php | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/mod/connedit.php b/mod/connedit.php index 6170d05a8..877c12dc7 100644 --- a/mod/connedit.php +++ b/mod/connedit.php @@ -190,7 +190,7 @@ function connedit_post(&$a) { } } - $abook_pending = (($new_friend) ? 0 : $orig_record[0]['abook_pending']; + $abook_pending = (($new_friend) ? 0 : $orig_record[0]['abook_pending']); $r = q("UPDATE abook SET abook_profile = '%s', abook_my_perms = %d , abook_closeness = %d, abook_pending = %d, abook_incl = '%s', abook_excl = '%s' @@ -652,12 +652,31 @@ function connedit_content(&$a) { $perms[] = array('perms_' . $k, $v[3], (($contact['abook_their_perms'] & $v[1]) ? "1" : ""),$thisperm, $v[1], (($channel[$v[0]] == PERMS_SPECIFIC) ? '' : '1'), $v[4], $checkinherited); } + $locstr = ''; + + $locs = q("select hubloc_addr as location from hubloc left join site on hubloc_url = site_url where hubloc_hash = '%s' + and hubloc_deleted = 0 and site_dead = 0", + dbesc($contact['xchan_hash']) + ); + + if($locs) { + foreach($locs as $l) { + if(strlen($locstr)) + $locstr .= ', '; + $locstr .= $l['location']; + } + } + else + $locstr = t('none'); + $o .= replace_macros($tpl,array( '$header' => (($self) ? t('Connection Default Permissions') : sprintf( t('Connection: %s'),$contact['xchan_name'])), '$autoperms' => array('autoperms',t('Apply these permissions automatically'), ((get_pconfig(local_channel(),'system','autoperms')) ? 1 : 0), 'Connection requests will be approved without your interaction', array(t('No'),('Yes'))), '$addr' => $contact['xchan_addr'], - '$addr_text' => t('This connection\'s address is'), + '$addr_text' => t('This connection\'s primary address is'), + '$loc_text' => t('Available locations:'), + '$locstr' => $locstr, '$notself' => (($self) ? '' : '1'), '$self' => (($self) ? '1' : ''), '$autolbl' => t('The permissions indicated on this page will be applied to all new connections.'), @@ -668,8 +687,8 @@ function connedit_content(&$a) { '$lbl_rating_txt' => t('Optionally explain your rating'), '$connfilter' => feature_enabled(local_channel(),'connfilter'), '$connfilter_label' => t('Custom Filter'), - '$incl' => array('abook_incl',t('Only import posts with this text'), $contact['abook_incl'],t('words one per line or #tags or /patterns/, leave blank to import all posts')), - '$excl' => array('abook_excl',t('Do not import posts with this text'), $contact['abook_excl'],t('words one per line or #tags or /patterns/, leave blank to import all posts')), + '$incl' => array('abook_incl',t('Only import posts with this text'), $contact['abook_incl'],t('words one per line or #tags or /patterns/ or lang=xx, leave blank to import all posts')), + '$excl' => array('abook_excl',t('Do not import posts with this text'), $contact['abook_excl'],t('words one per line or #tags or /patterns/ or lang=xx, leave blank to import all posts')), '$rating_text' => array('rating_text', t('Optionally explain your rating'),$rating_text,''), '$rating_info' => t('This information is public!'), '$rating' => $rating, |