From: Brenda Wallace Date: Mon, 16 Mar 2009 21:25:47 +0000 (+1300) Subject: quoted the users table X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c2e529c72b17b61f2203466b2bfd73f07b8371f0;p=quix0rs-gnu-social.git quoted the users table --- diff --git a/actions/featured.php b/actions/featured.php index f3bade6a5e..14d653cea2 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 +}