aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-11-20 22:24:26 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-11-20 22:24:26 +0000
commit3c670790fc2d2b4092daee497354ca95d58e2f4f (patch)
tree141be0033e708d161e4e3f9ee7e7093306a31d5b
parentc61f343b278e83d2c0d32287935466582dbc6cfa (diff)
downloadelgg-3c670790fc2d2b4092daee497354ca95d58e2f4f.tar.gz
elgg-3c670790fc2d2b4092daee497354ca95d58e2f4f.tar.bz2
Fixed a bug with group by and order by in elgg_get_entities. #ElggCampBA
git-svn-id: http://code.elgg.org/elgg/trunk@3694 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/entities.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index 0fa08de58..bcf045760 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -1756,12 +1756,12 @@ function elgg_get_entities(array $options = array()) {
// Add access controls
$query .= get_access_sql_suffix('e');
if (!$options['count']) {
- if ($group_by = sanitise_string($options['group_by'])) {
- $query .= " GROUP BY $group_by";
+ if ($options['group_by'] = sanitise_string($options['group_by'])) {
+ $query .= " GROUP BY {$options['group_by']}";
}
- if ($order_by = sanitise_string($options['order_by'])) {
- $query .= " ORDER BY $order_by";
+ if ($options['order_by'] = sanitise_string($options['order_by'])) {
+ $query .= " ORDER BY {$options['order_by']}";
}
if ($options['limit']) {