The friendlist_blocks_display_user_list function has a couple major issues.

Current:

function friendlist_blocks_display_user_list($results, $list_class) {

  while ($row = db_fetch_array($results)) {
    $account = user_load(array('uid' => $row['uid']));
    $picture = theme_get_setting('toggle_node_user_picture') ? theme('user_picture', $account) : '';

    $list[] = $picture .' '. theme('username', $account);
    return theme('item_list', $list, NULL, 'ul', array('class' => $list_class));
  }

}

Fixed:

function friendlist_blocks_display_user_list($results, $list_class) {
  $list = array();
  while ($row = db_fetch_array($results)) {
    $account = user_load(array('uid' => $row['uid']));
    $picture = theme_get_setting('toggle_node_user_picture') ? theme('user_picture', $account) : '';
    $list[] = $picture .' '. theme('username', $account); 
  }
  return theme('item_list', $list, NULL, 'ul', array('class' => $list_class));
}

As you can see the in the current one the return is inside the while statement meaning that the loop will always run just once. Also the theme function for the list is inside the while loop again there is only one item in $list at that time.

Comments

mercmobily’s picture

Hi,

OUCH.
Sorry... fixed in CVS.

Merc.

mercmobily’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.