diff options
author | Brenda Wallace <shiny@cpan.org> | 2009-03-12 14:59:36 +1300 |
---|---|---|
committer | Brenda Wallace <shiny@cpan.org> | 2009-03-12 15:01:46 +1300 |
commit | 896dbfaf675c4a91f2bc5a22fe2eac6f6461ec0f (patch) | |
tree | b083e76205e1f180aefeb735a82773199b9501bd /lib | |
parent | 2fa6d429776f60925717a7c18330c3df0cd9d124 (diff) |
fixed quoting of the table named "user"
Diffstat (limited to 'lib')
-rw-r--r-- | lib/featureduserssection.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/featureduserssection.php b/lib/featureduserssection.php index aed94b1a5..4b9238d47 100644 --- a/lib/featureduserssection.php +++ b/lib/featureduserssection.php @@ -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; |