aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/connedit.php24
-rw-r--r--mod/editpost.php1
-rw-r--r--mod/item.php4
3 files changed, 24 insertions, 5 deletions
diff --git a/mod/connedit.php b/mod/connedit.php
index 65eba885a..c3fcc6d54 100644
--- a/mod/connedit.php
+++ b/mod/connedit.php
@@ -652,12 +652,30 @@ 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 where hubloc_hash = '%s'",
+ 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 +686,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,
diff --git a/mod/editpost.php b/mod/editpost.php
index 1bee16ee7..2f999858f 100644
--- a/mod/editpost.php
+++ b/mod/editpost.php
@@ -90,7 +90,6 @@ function editpost_content(&$a) {
$category .= ', ';
$category .= $cat['term'];
}
-
}
if($itm[0]['attach']) {
diff --git a/mod/item.php b/mod/item.php
index 4dcf8edd7..591dc8407 100644
--- a/mod/item.php
+++ b/mod/item.php
@@ -607,6 +607,7 @@ function item_post(&$a) {
if(preg_match_all('/(\[attachment\](.*?)\[\/attachment\])/',$body,$match)) {
$attachments = array();
+ $i = 0;
foreach($match[2] as $mtch) {
$attach_link = '';
$hash = substr($mtch,0,strpos($mtch,','));
@@ -626,7 +627,8 @@ function item_post(&$a) {
$attach_link = '[audio]' . z_root() . '/attach/' . $r['data']['hash'] . '/' . $r['data']['revision'] . (($ext) ? $ext : '') . '[/audio]';
elseif(strpos($r['data']['filetype'],'video/') !== false)
$attach_link = '[video]' . z_root() . '/attach/' . $r['data']['hash'] . '/' . $r['data']['revision'] . (($ext) ? $ext : '') . '[/video]';
- $body = str_replace($match[1],$attach_link,$body);
+ $body = str_replace($match[1][$i],$attach_link,$body);
+ $i++;
}
}