From 821248dd28977e46b2ded8296dbf7cf3931c0fc6 Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Fri, 22 Dec 2006 04:34:07 +0000 Subject: Bug 364293: Do not call can_see_product() from templates - Patch by Frédéric Buclin r=bkor a=justdave MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/en/default/search/form.html.tmpl | 4 ++-- template/en/default/search/search-specific.html.tmpl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'template/en/default/search') diff --git a/template/en/default/search/form.html.tmpl b/template/en/default/search/form.html.tmpl index 3cc8b7b43..4942bafe0 100644 --- a/template/en/default/search/form.html.tmpl +++ b/template/en/default/search/form.html.tmpl @@ -44,8 +44,8 @@ var tms = new Array(); [% FOREACH c = classification %] prods[[% nclass FILTER js %]] = [ [% sep = '' %] - [%- FOREACH item = c.products -%] - [%- IF user.can_see_product(item.name) && item.components.size -%] + [%- FOREACH item = user.get_selectable_products(c.id) -%] + [%- IF item.components.size -%] [%- sep FILTER js %]'[% item.name FILTER js %]' [%- sep = ',' -%] [%- END -%] diff --git a/template/en/default/search/search-specific.html.tmpl b/template/en/default/search/search-specific.html.tmpl index 05c8bd180..f92ea7bd5 100644 --- a/template/en/default/search/search-specific.html.tmpl +++ b/template/en/default/search/search-specific.html.tmpl @@ -73,8 +73,8 @@ for "crash secure SSL flash". [% IF Param('useclassification') %] [% FOREACH c = classification %] - [% FOREACH p = c.products %] - [% IF user.can_see_product(p.name) && p.components.size %] + [% FOREACH p = user.get_selectable_products(c.id) %] + [% IF p.components.size %]