]> git.mxchange.org Git - friendica.git/commitdiff
Small fixes to "nogroup"
authorMichael <heluecht@pirati.ca>
Wed, 29 Nov 2017 20:59:06 +0000 (20:59 +0000)
committerMichael <heluecht@pirati.ca>
Wed, 29 Nov 2017 20:59:06 +0000 (20:59 +0000)
mod/nogroup.php
src/Object/Contact.php

index a66a70a1e0cef670d1c3e5ccb425518712bbef18..5fb9afc2ac48c77e1a2d5135994e597ddc326cc9 100644 (file)
@@ -55,7 +55,7 @@ function nogroup_content(App $a)
                                'about'         => $contact_details['about'],
                                'sparkle' => $sparkle,
                                'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']),
-                               'url' => $url,
+                               'url' => $rr['url'],
                                'network' => network_to_name($rr['network'], $url),
                        );
                }
index d7e78536218052af874c01bdeac99e4b5b7bea46..919113672e18c6f60ac4109e01ca3a1960ea4e73 100644 (file)
@@ -477,12 +477,14 @@ class Contact extends BaseObject
                                "SELECT COUNT(*) AS `total`
                                 FROM `contact`
                                 WHERE `uid` = %d
-                                AND `self` = 0
+                                AND NOT `self`
+                                AND NOT `blocked`
+                                AND NOT `pending`
                                 AND `id` NOT IN (
                                        SELECT DISTINCT(`contact-id`)
                                        FROM `group_member`
                                        WHERE `uid` = %d
-                               ) ", intval($uid), intval($uid)
+                               )", intval($uid), intval($uid)
                        );
 
                        return $r;
@@ -492,13 +494,13 @@ class Contact extends BaseObject
                        "SELECT *
                        FROM `contact`
                        WHERE `uid` = %d
-                       AND `self` = 0
+                       AND NOT `self`
+                       AND NOT `blocked`
+                       AND NOT `pending`
                        AND `id` NOT IN (
                                SELECT DISTINCT(`contact-id`)
                                FROM `group_member` WHERE `uid` = %d
                        )
-                       AND `blocked` = 0
-                       AND `pending` = 0
                        LIMIT %d, %d", intval($uid), intval($uid), intval($start), intval($count)
                );
                return $r;