|
From: Ulf E. <ulf...@us...> - 2005-10-05 20:29:31
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1150/inc Modified Files: functions.php Log Message: Changes to the CloseBug permission Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.68 retrieving revision 1.69 diff -u -r1.68 -r1.69 --- functions.php 4 Oct 2005 20:10:04 -0000 1.68 +++ functions.php 5 Oct 2005 20:28:53 -0000 1.69 @@ -51,7 +51,7 @@ /// /// Build a select box with the item matching $value selected -function build_select($box, $selected = '', $project = 0) { +function build_select($box, $selected = '', $project = 0, $limit = false) { global $db, $select, $perm, $restricted_projects, $QUERY, $u; // create hash to map tablenames @@ -78,7 +78,9 @@ 'severity' => $querystart.$querymid, 'priority' => $querystart.$querymid, 'site' => $querystart.$querymid, - 'status' => $querystart.$querymid, + 'status' => (!$limit || $perm->have_perm('CloseBug', $project) + ? $querystart.$querymid + : $querystart." where sort_order > 0 and (bug_open = 1 or status_id = ".(!empty($selected)?$selected:0).") order by sort_order"), 'resolution' => $querystart.$querymid, 'project' => $perm->have_perm('Admin') ? $querystart." where ". |