I've added some "." (full stop) to "ip_root/includes/downloads/includes/dl_stats.php" because it returns some SQL errors "unexpected T_CONSTANT_ENCAPSED_STRING...".
This is one of the faulty SQL query (lines 363 to 371]:
Code: [Hide]
- $sql = "SELECT count(s.id) as dl_counts, s.user_id, s.username, u.username as user_username, u.user_active, u.user_color
- FROM " . DL_STATS_TABLE . " s, " . USERS_TABLE " u
- WHERE s.direction = 0
- AND s.cat_id IN (" . implode(',', $access_cats) . ")
- $sql_where
- AND u.user_id = s.user_id
- GROUP BY s.user_id, user_username
- ORDER BY dl_counts DESC
- LIMIT 10";
That I changed in:
Code: [Hide]
- $sql = "SELECT count(s.id) as dl_counts, s.user_id, s.username, u.username as user_username, u.user_active, u.user_color
- FROM " . DL_STATS_TABLE . " s, " . USERS_TABLE . " u
- WHERE s.direction = 0
- AND s.cat_id IN (" . implode(',', $access_cats) . ")
- $sql_where
- AND u.user_id = s.user_id
- GROUP BY s.user_id, user_username
- ORDER BY dl_counts DESC
- LIMIT 10";
The "." (full stop) to add is the one near "USERS_TABLES".
All the query after this one are affected by the same bug, so you have to add other "." on lines 408, 453 and 497 always after "USERS_TABLES".