equal
deleted
inserted
replaced
1985 } |
1985 } |
1986 function user_level($level, $row) |
1986 function user_level($level, $row) |
1987 { |
1987 { |
1988 global $db, $session, $paths, $template, $plugins; // Common objects |
1988 global $db, $session, $paths, $template, $plugins; // Common objects |
1989 global $lang; |
1989 global $lang; |
|
1990 /* |
1990 switch ( $level ) |
1991 switch ( $level ) |
1991 { |
1992 { |
1992 case USER_LEVEL_GUEST: |
1993 case USER_LEVEL_GUEST: |
1993 $s_level = $lang->get('userfuncs_ml_level_guest'); break; |
1994 $s_level = $lang->get('userfuncs_ml_level_guest'); break; |
1994 case USER_LEVEL_MEMBER: |
1995 case USER_LEVEL_MEMBER: |
1999 case USER_LEVEL_ADMIN: |
2000 case USER_LEVEL_ADMIN: |
2000 $s_level = $lang->get('userfuncs_ml_level_admin'); break; |
2001 $s_level = $lang->get('userfuncs_ml_level_admin'); break; |
2001 default: |
2002 default: |
2002 $s_level = $lang->get('userfuncs_ml_level_unknown', array( 'level' => $level )); |
2003 $s_level = $lang->get('userfuncs_ml_level_unknown', array( 'level' => $level )); |
2003 } |
2004 } |
|
2005 */ |
|
2006 |
|
2007 // TODO: Requested by mm3. Is this too CPU-intensive? Optimize? |
|
2008 // Performance yield =/= about the same (but only 4 users under testing conditions) |
|
2009 $rankdata = $session->get_user_rank($row['user_id']); |
|
2010 $s_level = '<span style="' . $rankdata['rank_style'] . '">' . $lang->get($rankdata['rank_title']) . '</span>'; |
|
2011 |
2004 return $s_level; |
2012 return $s_level; |
2005 } |
2013 } |
2006 function email($addy, $row) |
2014 function email($addy, $row) |
2007 { |
2015 { |
2008 global $lang; |
2016 global $lang; |