aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-04-26 14:22:04 +0200
committerMario Vavti <mario@mariovavti.com>2018-04-26 14:22:04 +0200
commit953391cca92537614b929034792429ee92b18798 (patch)
tree9379e8f603891f1c2db402c2b5293258a4bec7ca
parent8e0fc9e762be30646b0cb36d55f966cb9d1186d0 (diff)
parentf32ba0656430929ba5af3d1ef730d7ada98c0ea7 (diff)
downloadvolse-hubzilla-953391cca92537614b929034792429ee92b18798.tar.gz
volse-hubzilla-953391cca92537614b929034792429ee92b18798.tar.bz2
volse-hubzilla-953391cca92537614b929034792429ee92b18798.zip
Merge remote-tracking branch 'mike/master' into dev
-rw-r--r--Zotlabs/Module/Acl.php13
-rw-r--r--include/text.php1
2 files changed, 7 insertions, 7 deletions
diff --git a/Zotlabs/Module/Acl.php b/Zotlabs/Module/Acl.php
index 92e7d176d..2678aeb7a 100644
--- a/Zotlabs/Module/Acl.php
+++ b/Zotlabs/Module/Acl.php
@@ -337,22 +337,21 @@ class Acl extends \Zotlabs\Web\Controller {
if($r) {
foreach($r as $g) {
- if(($g['network'] === 'rss') && ($type != 'a'))
+ if(in_array($g['network'],['rss','anon','unknown']) && ($type != 'a'))
continue;
$g['hash'] = urlencode($g['hash']);
if(! $g['nick']) {
- $t = explode(' ',strtolower($g['name']));
- $g['nick'] = $t[0] . '@';
+ $g['nick'] = $g['url'];
}
- if(in_array($g['hash'],$permitted) && in_array($type, [ 'c', 'f' ]) && (! $noforums)) {
+ if(in_array($g['hash'],$permitted) && $type === 'f' && (! $noforums)) {
$contacts[] = array(
"type" => "c",
"photo" => "images/twopeople.png",
- "name" => $g['name'] . (($type === 'f') ? '' : '+'),
- "id" => urlencode($g['id']) . (($type === 'f') ? '' : '+'),
+ "name" => $g['name'],
+ "id" => urlencode($g['id']),
"xid" => $g['hash'],
"link" => (($g['nick']) ? $g['nick'] : $g['url']),
"nick" => substr($g['nick'],0,strpos($g['nick'],'@')),
@@ -369,7 +368,7 @@ class Acl extends \Zotlabs\Web\Controller {
"id" => urlencode($g['id']),
"xid" => $g['hash'],
"link" => (($g['nick']) ? $g['nick'] : $g['url']),
- "nick" => (($g['nick']) ? substr($g['nick'],0,strpos($g['nick'],'@')) : $g['nick']),
+ "nick" => ((strpos($g['nick'],'@')) ? substr($g['nick'],0,strpos($g['nick'],'@')) : $g['nick']),
"self" => (intval($g['abook_self']) ? 'abook-self' : ''),
"taggable" => '',
"label" => '',
diff --git a/include/text.php b/include/text.php
index 645c15df0..ede62f582 100644
--- a/include/text.php
+++ b/include/text.php
@@ -2213,6 +2213,7 @@ function ids_to_querystr($arr,$idx = 'id',$quote = false) {
* @param $arr array
* @param $elm array key to extract from sub-array
* @param $delim string default ','
+ * @param $each filter function to apply to each element before evaluation, default is 'trim'.
* @returns string
*/