]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 364293: Do not call can_see_product() from templates - Patch by Frédéric Buclin...
authorlpsolit%gmail.com <>
Fri, 22 Dec 2006 04:34:07 +0000 (04:34 +0000)
committerlpsolit%gmail.com <>
Fri, 22 Dec 2006 04:34:07 +0000 (04:34 +0000)
template/en/default/search/form.html.tmpl
template/en/default/search/search-specific.html.tmpl

index 3cc8b7b4333248bb7213434b0d4225a00724fc33..4942bafe0b6690a69e53378d6b8eb7c854601060 100644 (file)
@@ -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 -%]
index 05c8bd180115d0904830e9b49b628ac27a798297..f92ea7bd56a1fa6245882dd30ab13dbc814838c6 100644 (file)
@@ -73,8 +73,8 @@ for "crash secure SSL flash".
         [% IF Param('useclassification') %]
           [% FOREACH c = classification %]
             <optgroup label="[% c.name FILTER html %]">
-            [% 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 %]
                 <option value="[% p.name FILTER html %]"
                   [% " selected" IF lsearch(default.product, p.name) != -1 %]>
                   [% p.name FILTER html %]