X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2FForumManager.php;h=039b4f5d248af865a626228229c7399243a5de11;hb=3b2cd854837e5df38f75f323aab24e31098812d4;hp=3fae9f3d81f48ff691048ee60adc588bbcb0c72b;hpb=41a36606c6ee92c914acbb7f6d9ea79c0a149088;p=friendica.git diff --git a/include/ForumManager.php b/include/ForumManager.php index 3fae9f3d81..039b4f5d24 100644 --- a/include/ForumManager.php +++ b/include/ForumManager.php @@ -1,5 +1,9 @@ `failure_update` $order ", - intval($uid) + $uid ); if (!$contacts) return($forumlist); - foreach($contacts as $contact) { + while ($contact = dba::fetch($contacts)) { $forumlist[] = array( 'url' => $contact['url'], 'name' => $contact['name'], @@ -59,6 +63,8 @@ class ForumManager { 'thumb' => $contact['thumb'], ); } + dba::close($contacts); + return($forumlist); } @@ -76,7 +82,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 = ''; @@ -88,7 +94,7 @@ class ForumManager { $total = count($contacts); $visible_forums = 10; - if (dbm::is_result($contacts)) { + if (DBM::is_result($contacts)) { $id = 0; @@ -102,7 +108,7 @@ class ForumManager { 'name' => $contact['name'], 'cid' => $contact['id'], 'selected' => $selected, - 'micro' => App::remove_baseurl(proxy_url($contact['micro'], false, PROXY_SIZE_MICRO)), + 'micro' => System::removedBaseUrl(proxy_url($contact['micro'], false, PROXY_SIZE_MICRO)), 'id' => ++$id, ); $entries[] = $entry; @@ -136,7 +142,7 @@ class ForumManager { public static function profile_advanced($uid) { $profile = intval(feature_enabled($uid,'forumlist_profile')); - if (! $profile) + if(! $profile) return; $o = ''; @@ -154,17 +160,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; } /**