]> git.mxchange.org Git - friendica.git/blobdiff - include/ForumManager.php
Degrade priority step by step
[friendica.git] / include / ForumManager.php
index 3fae9f3d81f48ff691048ee60adc588bbcb0c72b..8f38ed3a38eac9e5f81d1f325c74abab2eeb4b58 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use Friendica\App;
+
 /**
  * @file include/ForumManager.php
  * @brief ForumManager class with its methods related to forum functionality *
@@ -76,7 +78,7 @@ class ForumManager {
         */
        public static function widget($uid,$cid = 0) {
 
-               if (! intval(feature_enabled(local_user(),'forumlist_widget')))
+               if(! intval(feature_enabled(local_user(),'forumlist_widget')))
                        return;
 
                $o = '';
@@ -136,7 +138,7 @@ class ForumManager {
        public static function profile_advanced($uid) {
 
                $profile = intval(feature_enabled($uid,'forumlist_profile'));
-               if (! $profile)
+               if(! $profile)
                        return;
 
                $o = '';
@@ -154,17 +156,13 @@ class ForumManager {
                foreach($contacts as $contact) {
                        $forumlist .= micropro($contact,false,'forumlist-profile-advanced');
                        $total_shown ++;
-
-                       if ($total_shown == $show_total) {
+                       if($total_shown == $show_total)
                                break;
-                       }
                }
 
-               if (count($contacts) > 0) {
+               if(count($contacts) > 0)
                        $o .= $forumlist;
-               }
-
-               return $o;
+                       return $o;
        }
 
        /**