|
From: Benjamin C. <bc...@us...> - 2002-03-05 22:14:03
|
Update of /cvsroot/phpbt/phpbt/inc
In directory usw-pr-cvs1:/tmp/cvs-serv17352/inc
Modified Files:
functions.php
Log Message:
Use the new project restriction code
Index: functions.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- functions.php 1 Mar 2002 00:41:30 -0000 1.4
+++ functions.php 5 Mar 2002 22:14:00 -0000 1.5
@@ -43,7 +43,7 @@
///
/// Build a select box with the item matching $value selected
function build_select($box, $value = '', $project = 0) {
- global $q, $select, $perm, $auth, $STRING;
+ global $q, $select, $perm, $auth, $STRING, $restricted_projects;
//create hash to map tablenames
$cfgDatabase = array(
@@ -66,11 +66,8 @@
'resolution' => $querystart.' where sort_order > 0 order by sort_order',
'project' => $perm->have_perm('Admin')
? $querystart." where active > 0 order by {$box}_name"
- : "select p.{$box}_id, {$box}_name from $cfgDatabase[$box] p left join ".
- TBL_PROJECT_GROUP.' pg using(project_id) where active > 0
- and (pg.project_id is null or pg.group_id in ('.
- delimit_list(',', $auth->auth['group_ids']).')) group by
- p.project_id, p.project_name order by project_name',
+ : $querystart." where project_id not in ($restricted_projects)".
+ " and active > 0 order by {$box}_name",
'component' => $querystart." where project_id = $project order by {$box}_name",
'version' => $querystart." where project_id = $project order by {$box}_id desc"
);
|