aboutsummaryrefslogtreecommitdiffstats
path: root/mod/acl.php
diff options
context:
space:
mode:
authorsirius <sirius83@gmx.de>2014-04-20 01:07:36 +0200
committerjmankiewicz <sirius83@gmx.de>2014-04-20 01:12:47 +0200
commitc946d926103a3bce94dcf99a137f3329ce011e2a (patch)
tree36749769bbd342f078a5315b2736b80e89e4542c /mod/acl.php
parent6cf5a69d7e8ac12c9c946397ca5c9a1126665974 (diff)
parent891a7fb0f5651447c43560210126a86a6b69aa29 (diff)
downloadvolse-hubzilla-c946d926103a3bce94dcf99a137f3329ce011e2a.tar.gz
volse-hubzilla-c946d926103a3bce94dcf99a137f3329ce011e2a.tar.bz2
volse-hubzilla-c946d926103a3bce94dcf99a137f3329ce011e2a.zip
Merge branch 'master' of https://github.com/friendica/red into mod-profpicperm
Diffstat (limited to 'mod/acl.php')
-rw-r--r--mod/acl.php21
1 files changed, 20 insertions, 1 deletions
diff --git a/mod/acl.php b/mod/acl.php
index 0f997c8b8..9bd1a9eb4 100644
--- a/mod/acl.php
+++ b/mod/acl.php
@@ -55,6 +55,17 @@ function acl_init(&$a){
intval(XCHAN_FLAGS_DELETED)
);
$contact_count = (int)$r[0]['c'];
+
+ if(intval(get_config('system','taganyone')) || intval(get_pconfig(local_user(),'system','taganyone'))) {
+ if(((! $r) || (! $r[0]['total'])) && $type == 'c') {
+ $r = q("SELECT COUNT(xchan_hash) AS c FROM xchan
+ WHERE not (xchan_flags & %d ) $sql_extra2" ,
+ intval(XCHAN_FLAGS_DELETED)
+ );
+ $contact_count = (int)$r[0]['c'];
+ }
+ }
+
}
elseif ($type == 'm') {
@@ -134,7 +145,15 @@ function acl_init(&$a){
intval(ABOOK_FLAG_BLOCKED|ABOOK_FLAG_PENDING|ABOOK_FLAG_ARCHIVED),
intval(XCHAN_FLAGS_DELETED)
);
-
+ if(intval(get_config('system','taganyone')) || intval(get_pconfig(local_user(),'system','taganyone'))) {
+ if((! $r) && $type == 'c') {
+ $r = 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
+ FROM xchan
+ WHERE not (xchan_flags & %d ) $sql_extra2 order by xchan_name asc" ,
+ intval(XCHAN_FLAGS_DELETED)
+ );
+ }
+ }
}
elseif($type == 'm') {