-$ADD = "userid";
-if (EXT_IS_ACTIVE("nickname")) $ADD = "nickname";
-$result = SQL_QUERY_ESC("SELECT userid, ".$ADD.", total_logins, last_online
-FROM "._MYSQL_PREFIX."_user_data
-WHERE total_logins>0 AND status='CONFIRMED' ORDER BY total_logins DESC LIMIT %s",
- array($_CONFIG['top10_max']), __FILE__, __LINE__);
+$result = SQL_QUERY_ESC("
+SELECT
+ userid, total_logins, last_online
+FROM
+ {!_MYSQL_PREFIX!}_user_data
+WHERE
+ total_logins > 0 AND
+ `status`='CONFIRMED'
+ORDER BY
+ total_logins DESC
+LIMIT %s",
+ array(getConfig('top10_max')), __FILE__, __LINE__);