Hier nochmal der komplette Hack: (Ersetzen wie oben)
Code: Alles auswählen
$search_author = str_replace('*', '%', trim($search_author));
// search_author Fix by Waagenbauer
if ( strlen( str_replace('%', '', $search_author) ) < 3 )
{
message_die(GENERAL_ERROR, "Couldn't obtain list of matching users (searching for: $search_author)");
}
// Fix von phpbb.com:
$author_sql = (strstr($search_author, '%')) ? "LIKE '" . str_replace("\'", "''", $search_author) . "'" : "='" . str_replace("\'", "''", $search_author) . "'";
//$sql = "SELECT user_id
// FROM " . USERS_TABLE . "
// WHERE username LIKE '" . str_replace("\'", "''", $search_author) . "'";
$sql = "SELECT user_id
FROM " . USERS_TABLE . "
WHERE username " . $author_sql;