From f800a88c40ad1963bacddb624fd88b8eb259593c Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 21 Aug 2006 00:45:29 +0000 Subject: [PATCH] r1114: Move the permission check up so we don't get string conversion of the product ID --- index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index f0191e9..6559848 100644 --- a/index.php +++ b/index.php @@ -60,6 +60,9 @@ $bugs_fetch = $db->query($sort->fetch_sql_query(null, $pagination->fetch_limit($ while ($bug = $db->fetch_array($bugs_fetch)) { $funct->exec_swap_bg($stylevar['alt_color'], ''); + + $bug['hiddendisplay'] = ((can_perform('canviewhidden', $bug['product']) OR (can_perform('canviewownhidden') AND $bug['userid'] == $bugsys->userinfo['userid'])) ? false : true); + $bug['bgcolor'] = ($bugsys->userinfo['showcolors'] ? $bugsys->datastore['status']["$bug[status]"]['color'] : $funct->bgcolour); $bug['product'] = $bugsys->datastore['product']["$bug[product]"]['title']; $bug['version'] = $bugsys->datastore['version']["$bug[version]"]['version']; @@ -68,8 +71,6 @@ while ($bug = $db->fetch_array($bugs_fetch)) $bug['priority'] = $bugsys->datastore['priority']["$bug[priority]"]['priority']; $bug['severity'] = $bugsys->datastore['severity']["$bug[severity]"]['severity']; - $bug['hiddendisplay'] = ((can_perform('canviewhidden', $bug['product']) 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']); -- 2.43.5