We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 896dbfaf authored by Brenda Wallace's avatar Brenda Wallace

fixed quoting of the table named "user"

parent 2fa6d429
......@@ -57,9 +57,14 @@ class FeaturedUsersSection extends ProfileSection
$quoted[] = "'$nick'";
}
$table = "user";
if(common_config('db','quote_identifiers')) {
$table = '"' . $table . '"';
}
$qry = 'SELECT profile.* ' .
'FROM profile JOIN user on profile.id = user.id ' .
'WHERE user.nickname in (' . implode(',', $quoted) . ') ' .
'FROM profile JOIN '. $table .' on profile.id = '. $table .'.id ' .
'WHERE '. $table .'.nickname in (' . implode(',', $quoted) . ') ' .
'ORDER BY profile.created DESC ';
$limit = PROFILES_PER_SECTION + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment