X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2FForumManager.php;h=8f38ed3a38eac9e5f81d1f325c74abab2eeb4b58;hb=796efa119f100a2c2408f06963b1feb1b31a0757;hp=73eb511de60b2374d687ea58088c6f2e041a5117;hpb=f7537c9e90fa1b35618abd523d0d00f9658085a9;p=friendica.git diff --git a/include/ForumManager.php b/include/ForumManager.php index 73eb511de6..8f38ed3a38 100644 --- a/include/ForumManager.php +++ b/include/ForumManager.php @@ -1,12 +1,14 @@ forum name * 'id' => number of the key from the array * 'micro' => contact photo in format micro + * 'thumb' => contact photo in format thumb */ public static function get_list($uid, $showhidden = true, $lastitem, $showprivate = false) { @@ -38,7 +41,7 @@ class ForumManager { $select = '(`forum` OR `prv`)'; } - $contacts = q("SELECT `contact`.`id`, `contact`.`url`, `contact`.`name`, `contact`.`micro` FROM `contact` + $contacts = q("SELECT `contact`.`id`, `contact`.`url`, `contact`.`name`, `contact`.`micro`, `contact`.`thumb` FROM `contact` WHERE `network`= 'dfrn' AND $select AND `uid` = %d AND NOT `blocked` AND NOT `hidden` AND NOT `pending` AND NOT `archive` AND `success_update` > `failure_update` @@ -55,6 +58,7 @@ class ForumManager { 'name' => $contact['name'], 'id' => $contact['id'], 'micro' => $contact['micro'], + 'thumb' => $contact['thumb'], ); } return($forumlist); @@ -86,10 +90,10 @@ class ForumManager { $total = count($contacts); $visible_forums = 10; - if(count($contacts)) { + if (dbm::is_result($contacts)) { $id = 0; -$a = get_app(); + foreach($contacts as $contact) { $selected = (($cid == $contact['id']) ? ' forum-selected' : ''); @@ -100,7 +104,7 @@ $a = get_app(); 'name' => $contact['name'], 'cid' => $contact['id'], 'selected' => $selected, - 'micro' => $a->get_cached_avatar_image(proxy_url($contact['micro'], false, PROXY_SIZE_MICRO)), + 'micro' => App::remove_baseurl(proxy_url($contact['micro'], false, PROXY_SIZE_MICRO)), 'id' => ++$id, ); $entries[] = $entry;