fixed quoting of the table named "user"
This commit is contained in:
parent
2fa6d42977
commit
896dbfaf67
@ -57,9 +57,14 @@ class FeaturedUsersSection extends ProfileSection
|
|||||||
$quoted[] = "'$nick'";
|
$quoted[] = "'$nick'";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$table = "user";
|
||||||
|
if(common_config('db','quote_identifiers')) {
|
||||||
|
$table = '"' . $table . '"';
|
||||||
|
}
|
||||||
|
|
||||||
$qry = 'SELECT profile.* ' .
|
$qry = 'SELECT profile.* ' .
|
||||||
'FROM profile JOIN user on profile.id = user.id ' .
|
'FROM profile JOIN '. $table .' on profile.id = '. $table .'.id ' .
|
||||||
'WHERE user.nickname in (' . implode(',', $quoted) . ') ' .
|
'WHERE '. $table .'.nickname in (' . implode(',', $quoted) . ') ' .
|
||||||
'ORDER BY profile.created DESC ';
|
'ORDER BY profile.created DESC ';
|
||||||
|
|
||||||
$limit = PROFILES_PER_SECTION + 1;
|
$limit = PROFILES_PER_SECTION + 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user