diff options
author | Brett Profitt <brett.profitt@gmail.com> | 2011-09-28 22:05:31 -0700 |
---|---|---|
committer | Brett Profitt <brett.profitt@gmail.com> | 2011-09-28 22:05:31 -0700 |
commit | 90f5e694f6e7005f35297f9493f5caeedcf25a8c (patch) | |
tree | 26d960c24368e3cf212be08eaa2f27f843025872 /engine/lib/river.php | |
parent | 700ae307bd2bc698f60ffd02afcc87aaff9f74e5 (diff) | |
download | elgg-90f5e694f6e7005f35297f9493f5caeedcf25a8c.tar.gz elgg-90f5e694f6e7005f35297f9493f5caeedcf25a8c.tar.bz2 |
Fixes #3713. elgg_get_entities() and friends return false if passed invalid options.
Diffstat (limited to 'engine/lib/river.php')
-rw-r--r-- | engine/lib/river.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engine/lib/river.php b/engine/lib/river.php index a11e6145c..e283c0595 100644 --- a/engine/lib/river.php +++ b/engine/lib/river.php @@ -170,9 +170,6 @@ function elgg_delete_river(array $options = array()) { $wheres[] = "rv.posted <= {$options['posted_time_upper']}"; } - // remove identical where clauses - $wheres = array_unique($wheres); - // see if any functions failed // remove empty strings on successful functions foreach ($wheres as $i => $where) { @@ -183,6 +180,9 @@ function elgg_delete_river(array $options = array()) { } } + // remove identical where clauses + $wheres = array_unique($wheres); + $query = "DELETE rv.* FROM {$CONFIG->dbprefix}river rv "; // remove identical join clauses @@ -304,9 +304,6 @@ function elgg_get_river(array $options = array()) { } } - // remove identical where clauses - $wheres = array_unique($wheres); - // see if any functions failed // remove empty strings on successful functions foreach ($wheres as $i => $where) { @@ -317,6 +314,9 @@ function elgg_get_river(array $options = array()) { } } + // remove identical where clauses + $wheres = array_unique($wheres); + if (!$options['count']) { $query = "SELECT DISTINCT rv.* FROM {$CONFIG->dbprefix}river rv "; } else { |