]> git.mxchange.org Git - friendica.git/blobdiff - include/acl_selectors.php
Split the name in the hcard
[friendica.git] / include / acl_selectors.php
index ef75d416f6f43a45eef554f4fba06450444d7b14..7a488ca40bb6511b211ea57c2d45703373787e9a 100644 (file)
@@ -1,21 +1,18 @@
 <?php
-
 /**
  * @file include/acl_selectors.php
  */
-
 use Friendica\App;
+use Friendica\Content\Feature;
 use Friendica\Core\Config;
 use Friendica\Database\DBM;
-use Friendica\Model\GlobalContact;
-use Friendica\Object\Contact;
+use Friendica\Model\Contact;
+use Friendica\Model\GContact;
 
 require_once "include/contact_selectors.php";
 require_once "include/contact_widgets.php";
-require_once "include/features.php";
 require_once "mod/proxy.php";
 
-
 /**
  * @package acl_selectors
  */
@@ -380,7 +377,7 @@ function populate_acl($user = null, $show_jotnets = false) {
                '$aclModalTitle' => t('Permissions'),
                '$aclModalDismiss' => t('Close'),
                '$features' => array(
-               'aclautomention' => (feature_enabled($user['uid'], "aclautomention") ? "true" : "false")
+               'aclautomention' => (Feature::isEnabled($user['uid'], "aclautomention") ? "true" : "false")
                ),
        ));
 
@@ -498,10 +495,9 @@ function acl_lookup(App $a, $out_type = 'json') {
                                WHERE `uid` = %d AND NOT `self`
                                AND NOT `blocked` AND NOT `pending` AND NOT `archive`
                                AND `success_update` >= `failure_update`
-                               AND `network` IN ('%s','%s','%s') $sql_extra2" ,
+                               AND `network` IN ('%s', '%s') $sql_extra2" ,
                        intval(local_user()),
                        dbesc(NETWORK_DFRN),
-                       dbesc(NETWORK_ZOT),
                        dbesc(NETWORK_DIASPORA)
                );
                $contact_count = (int)$r[0]['c'];
@@ -533,7 +529,7 @@ function acl_lookup(App $a, $out_type = 'json') {
                // This can be done when we can delete cache entries via wildcard
                $r = q("SELECT `group`.`id`, `group`.`name`, GROUP_CONCAT(DISTINCT `group_member`.`contact-id` SEPARATOR ',') AS uids
                                FROM `group`
-                               INNER JOIN `group_member` ON `group_member`.`gid`=`group`.`id` AND `group_member`.`uid` = `group`.`uid`
+                               INNER JOIN `group_member` ON `group_member`.`gid`=`group`.`id`
                                WHERE NOT `group`.`deleted` AND `group`.`uid` = %d
                                        $sql_extra
                                GROUP BY `group`.`name`, `group`.`id`
@@ -593,12 +589,11 @@ function acl_lookup(App $a, $out_type = 'json') {
        } elseif ($type == 'm') {
                $r = q("SELECT `id`, `name`, `nick`, `micro`, `network`, `url`, `attag`, `addr` FROM `contact`
                        WHERE `uid` = %d AND NOT `self` AND NOT `blocked` AND NOT `pending` AND NOT `archive`
-                       AND `success_update` >= `failure_update` AND `network` IN ('%s','%s','%s')
+                       AND `success_update` >= `failure_update` AND `network` IN ('%s', '%s')
                        $sql_extra2
                        ORDER BY `name` ASC ",
                        intval(local_user()),
                        dbesc(NETWORK_DFRN),
-                       dbesc(NETWORK_ZOT),
                        dbesc(NETWORK_DIASPORA)
                );
        } elseif ($type == 'a') {
@@ -779,7 +774,7 @@ function navbar_complete(App $a) {
        }
 
        if ($localsearch) {
-               $x = GlobalContact::searchByName($search, $mode);
+               $x = GContact::searchByName($search, $mode);
                return $x;
        }