]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/ForumManager.php
Fix the base url detection of AP profiles
[friendica.git] / src / Content / ForumManager.php
index 0ef18df35f95a04bfc6936705c9efa8b41b71ec7..98ea7aa6b97456fad2b8860205dc85d468080a7f 100644 (file)
@@ -111,7 +111,7 @@ class ForumManager
                                $selected = (($cid == $contact['id']) ? ' forum-selected' : '');
 
                                $entry = [
-                                       'url' => 'network?f=&cid=' . $contact['id'],
+                                       'url' => 'network?cid=' . $contact['id'],
                                        'external_url' => Contact::magicLink($contact['url']),
                                        'name' => $contact['name'],
                                        'cid' => $contact['id'],
@@ -196,18 +196,18 @@ class ForumManager
         */
        public static function countUnseenItems()
        {
-               $r = q(
+               $stmtContacts = DBA::p(
                        "SELECT `contact`.`id`, `contact`.`name`, COUNT(*) AS `count` FROM `item`
                                INNER JOIN `contact` ON `item`.`contact-id` = `contact`.`id`
-                               WHERE `item`.`uid` = %d AND `item`.`visible` AND NOT `item`.`deleted` AND `item`.`unseen`
+                               WHERE `item`.`uid` = ? AND `item`.`visible` AND NOT `item`.`deleted` AND `item`.`unseen`
                                AND `contact`.`network`= 'dfrn' AND (`contact`.`forum` OR `contact`.`prv`)
                                AND NOT `contact`.`blocked` AND NOT `contact`.`hidden`
                                AND NOT `contact`.`pending` AND NOT `contact`.`archive`
                                AND `contact`.`success_update` > `failure_update`
                                GROUP BY `contact`.`id` ",
-                       intval(local_user())
+                       local_user()
                );
 
-               return $r;
+               return DBA::toArray($stmtContacts);
        }
 }