]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
quoted the users table
authorBrenda Wallace <shiny@cpan.org>
Mon, 16 Mar 2009 21:25:47 +0000 (10:25 +1300)
committerBrenda Wallace <shiny@cpan.org>
Mon, 16 Mar 2009 21:27:29 +0000 (10:27 +1300)
actions/featured.php

index f3bade6a5ee1e07d6192a9349851ea26569561f1..14d653cea20a9bef8696425b74a19335fa3158de 100644 (file)
@@ -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
+}