]> git.mxchange.org Git - friendica.git/blobdiff - include/ForumManager.php
Only do the cleaning on specific networks
[friendica.git] / include / ForumManager.php
index 49417d1831564c0fbc0ce5e635213c0bc883449b..9e3c3b9d7020ece3a81418807abbb2b168acda40 100644 (file)
@@ -1,12 +1,12 @@
 <?php
 
 /**
- * @file include/forum.php
- * @brief Functions related to forum functionality *
+ * @file include/ForumManager.php
+ * @brief ForumManager class with its methods related to forum functionality *
  */
 
 /**
- * @brief This class handles functions related to the forum functionality
+ * @brief This class handles metheods related to the forum functionality
  */
 class ForumManager {
 
@@ -86,7 +86,7 @@ class ForumManager {
                $total = count($contacts);
                $visible_forums = 10;
 
-               if(count($contacts)) {
+               if(dba::is_result($contacts)) {
 
                        $id = 0;
 
@@ -95,12 +95,12 @@ class ForumManager {
                                $selected = (($cid == $contact['id']) ? ' forum-selected' : '');
 
                                $entry = array(
-                                       'url' => z_root() . '/network?f=&cid=' . $contact['id'],
-                                       'external_url' => z_root() . '/redir/' . $contact['id'],
+                                       'url' => 'network?f=&cid=' . $contact['id'],
+                                       'external_url' => 'redir/' . $contact['id'],
                                        'name' => $contact['name'],
                                        'cid' => $contact['id'],
                                        'selected'      => $selected,
-                                       'micro' => proxy_url($contact['micro'], false, PROXY_SIZE_MICRO),
+                                       'micro' => App::remove_baseurl(proxy_url($contact['micro'], false, PROXY_SIZE_MICRO)),
                                        'id' => ++$id,
                                );
                                $entries[] = $entry;
@@ -187,4 +187,4 @@ class ForumManager {
                return $r;
        }
 
-}
\ No newline at end of file
+}