From 0650109d4bb5442cd77fcda61745dab67a632836 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Tue, 22 Dec 2009 13:50:52 -0800 Subject: Add merge_or_where() to MY_Datatabase_Builder and use that instead of or_where() for compatibility and convenience. Caught by failing unit tests. --- modules/gallery/helpers/item.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/gallery/helpers') 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; -- cgit v1.2.3