diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-12-22 13:50:52 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-12-22 13:50:52 -0800 |
commit | 0650109d4bb5442cd77fcda61745dab67a632836 (patch) | |
tree | d2afe8cfb857dcb58764c96e467edbd68c73ee02 /modules/gallery/helpers/item.php | |
parent | 7118f84aa9ae0ece97a41aba4e4d269a1e136df6 (diff) |
Add merge_or_where() to MY_Datatabase_Builder and use that instead of
or_where() for compatibility and convenience. Caught by failing unit
tests.
Diffstat (limited to 'modules/gallery/helpers/item.php')
-rw-r--r-- | modules/gallery/helpers/item.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gallery/helpers/item.php b/modules/gallery/helpers/item.php index b7be23cd..f6181f8a 100644 --- a/modules/gallery/helpers/item.php +++ b/modules/gallery/helpers/item.php @@ -155,12 +155,12 @@ class item_Core { $view_restrictions = array(); if (!identity::active_user()->admin) { foreach (identity::group_ids_for_active_user() as $id) { - $view_restrictions["items.view_$id"] = access::ALLOW; + $view_restrictions[] = array("items.view_$id", "=", access::ALLOW); } } if (count($view_restrictions)) { - $model->and_open()->or_where($view_restrictions)->close(); + $model->and_open()->merge_or_where($view_restrictions)->close(); } return $model; |