From 9cea46ca7e2aa27076619156aac51468b418b098 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sat, 16 Sep 2006 05:20:22 +0000 Subject: [PATCH] r1145: Fixed another can_perform() call --- docs/changes.txt | 1 + search.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index 35cc4da..cd6b5fc 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -4,6 +4,7 @@ - Changed array casting instances to is_array() checks, which are better - Made some of the email notifications better-worded - Fix the correct stylevar for language codes +- Fixed another can_perform() product-based permissions check [search.php] 1.1.0 Beta 2 =============================== diff --git a/search.php b/search.php index 2b1968f..12adfa5 100644 --- a/search.php +++ b/search.php @@ -392,13 +392,13 @@ if ($_REQUEST['do'] == 'results') { $funct->exec_swap_bg($stylevar['alt_color'], ''); $bug['bgcolor'] = ($bugsys->userinfo['showcolors'] ? $bugsys->datastore['status']["$bug[status]"]['color'] : $funct->bgcolour); + $bug['hiddendisplay'] = ((can_perform('canviewhidden', $bug['product']) OR (can_perform('canviewownhidden') AND $bug['userid'] == $bugsys->userinfo['userid'])) ? false : true); $bug['product'] = $bugsys->datastore['product']["$bug[product]"]['title']; $bug['version'] = $bugsys->datastore['version']["$bug[version]"]['version']; $bug['status'] = $bugsys->datastore['status']["$bug[status]"]['status']; $bug['resolution'] = $bugsys->datastore['resolution']["$bug[resolution]"]['resolution']; $bug['priority'] = $bugsys->datastore['priority']["$bug[priority]"]['priority']; $bug['severity'] = $bugsys->datastore['severity']["$bug[severity]"]['severity']; - $bug['hiddendisplay'] = ((can_perform('canviewhidden', $bug['productid']) OR (can_perform('canviewownhidden') AND $bug['userid'] == $bugsys->userinfo['userid'])) ? false : true); $bug['lastposttime'] = ($bug['hiddendisplay'] ? $bug['hiddenlastposttime'] : $bug['lastposttime']); $bug['lastpost'] = ($bug['hiddendisplay'] ? $bug['hiddenlastpostbyname'] : $bug['lastpostbyname']); $bug['lastposttime'] = $datef->format($bugsys->options['dateformat'], $bug['lastposttime']); -- 2.43.5