diff options
author | Brenda Wallace <shiny@cpan.org> | 2009-03-17 10:25:47 +1300 |
---|---|---|
committer | Brenda Wallace <shiny@cpan.org> | 2009-03-17 10:27:29 +1300 |
commit | c2e529c72b17b61f2203466b2bfd73f07b8371f0 (patch) | |
tree | 223600fdb609814c51db1309449e012348732f75 /actions/featured.php | |
parent | ea5e7ed2ff0873655a8399c5001686bea8a4adf7 (diff) |
quoted the users table
Diffstat (limited to 'actions/featured.php')
-rw-r--r-- | actions/featured.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/actions/featured.php b/actions/featured.php index f3bade6a5..14d653cea 100644 --- a/actions/featured.php +++ b/actions/featured.php @@ -107,6 +107,7 @@ class FeaturedAction extends Action $featured_nicks = common_config('nickname', 'featured'); + if (count($featured_nicks) > 0) { $quoted = array(); @@ -115,10 +116,15 @@ class FeaturedAction extends Action $quoted[] = "'$nick'"; } + $table = "user"; + if(common_config('db','quote_identifiers')) { + $table = '"' . $table . '"'; + } + $user = new User; $user->whereAdd(sprintf('nickname IN (%s)', implode(',', $quoted))); $user->limit(($this->page - 1) * PROFILES_PER_PAGE, PROFILES_PER_PAGE + 1); - $user->orderBy('user.nickname ASC'); + $user->orderBy($table .'.nickname ASC'); $user->find(); @@ -145,4 +151,4 @@ class FeaturedAction extends Action $this->page, 'featured'); } } -}
\ No newline at end of file +} |