diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-04-26 09:05:47 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-04-26 09:05:47 +0200 |
commit | 09666ae8e9d7195c4b839abd9b10ae23ff783558 (patch) | |
tree | c8947d413ed3b5258fe8e25b905d2cac98c034e0 /Zotlabs | |
parent | 953d02e4b7c8ae7e1ccbecb37751936cd23710e0 (diff) | |
parent | fe724acc3b78af5ed86b4bf0ff58bdd9b56356e2 (diff) | |
download | volse-hubzilla-09666ae8e9d7195c4b839abd9b10ae23ff783558.tar.gz volse-hubzilla-09666ae8e9d7195c4b839abd9b10ae23ff783558.tar.bz2 volse-hubzilla-09666ae8e9d7195c4b839abd9b10ae23ff783558.zip |
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Enotify.php | 4 | ||||
-rw-r--r-- | Zotlabs/Module/Acl.php | 18 | ||||
-rw-r--r-- | Zotlabs/Module/Network.php | 13 |
3 files changed, 16 insertions, 19 deletions
diff --git a/Zotlabs/Lib/Enotify.php b/Zotlabs/Lib/Enotify.php index 05ea67ea5..cfb0bd344 100644 --- a/Zotlabs/Lib/Enotify.php +++ b/Zotlabs/Lib/Enotify.php @@ -747,8 +747,8 @@ class Enotify { // generate a mime boundary $mimeBoundary = rand(0, 9) . "-" - .rand(10000000000, 9999999999) . "-" - .rand(10000000000, 9999999999) . "=:" + .rand(100000000, 999999999) . "-" + .rand(100000000, 999999999) . "=:" .rand(10000, 99999); // generate a multipart/alternative message header diff --git a/Zotlabs/Module/Acl.php b/Zotlabs/Module/Acl.php index 35594ae9f..92e7d176d 100644 --- a/Zotlabs/Module/Acl.php +++ b/Zotlabs/Module/Acl.php @@ -268,15 +268,15 @@ class Acl extends \Zotlabs\Web\Controller { }); } } - if(intval(get_config('system','taganyone')) || intval(get_pconfig(local_channel(),'system','taganyone'))) { - if((count($r) < 100) && $type == 'c') { - $r2 = q("SELECT substr(xchan_hash,1,18) as id, xchan_hash as hash, xchan_name as name, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick, 0 as abook_their_perms, 0 as abook_flags, 0 as abook_self - FROM xchan - WHERE xchan_deleted = 0 $sql_extra2 order by $order_extra2 xchan_name asc" - ); - if($r2) - $r = array_merge($r,$r2); - } + if((count($r) < 100) && $type == 'c') { + $r2 = q("SELECT substr(xchan_hash,1,18) as id, xchan_hash as hash, xchan_name as name, xchan_photo_s as micro, xchan_url as url, xchan_addr as nick, 0 as abook_their_perms, 0 as abook_flags, 0 as abook_self + FROM xchan + WHERE xchan_deleted = 0 and not xchan_network in ('rss','anon','unknown') $sql_extra2 order by $order_extra2 xchan_name asc" + ); + if($r2) { + $r = array_merge($r,$r2); + $r = unique_multidim_array($r,'hash'); + } } } elseif($type == 'm') { diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php index 8d017207b..e97ebf1d0 100644 --- a/Zotlabs/Module/Network.php +++ b/Zotlabs/Module/Network.php @@ -218,15 +218,13 @@ class Network extends \Zotlabs\Web\Controller { $contact_str = ''; $contacts = group_get_members($group); if($contacts) { - foreach($contacts as $c) { - if($contact_str) - $contact_str .= ','; - $contact_str .= "'" . $c['xchan'] . "'"; - } + $contact_str = ids_to_querystr($contacts,'xchan',true); } else { - $contact_str = ' 0 '; - info( t('Privacy group is empty')); + $contact_str = " '0' "; + if(! $update) { + info( t('Privacy group is empty')); + } } $item_thread_top = ''; $sql_extra = " AND item.parent IN ( SELECT DISTINCT parent FROM item WHERE true $sql_options AND (( author_xchan IN ( $contact_str ) OR owner_xchan in ( $contact_str )) or allow_gid like '" . protect_sprintf('%<' . dbesc($group_hash) . '>%') . "' ) and id = parent $item_normal ) "; @@ -480,7 +478,6 @@ class Network extends \Zotlabs\Web\Controller { $ordering = "commented"; if($load) { - // Fetch a page full of parent items for this page $r = q("SELECT item.parent AS item_id FROM item left join abook on ( item.owner_xchan = abook.abook_xchan $abook_uids ) |