|
From: Benjamin C. <bc...@us...> - 2002-03-05 22:11:53
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv16717
Modified Files:
index.php include.php
Log Message:
Move the project restriction code from index.php to include.php
Index: index.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/index.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- index.php 2 Mar 2002 18:48:30 -0000 1.16
+++ index.php 5 Mar 2002 22:11:47 -0000 1.17
@@ -92,17 +92,6 @@
"<img align=\"right\" src=\"jpgimages/".GenImgName()."\" ISMAP USEMAP=\"#myimagemap\" border=0>";
}
-// Check to see if we have bugs from projects that shouldn't be visible to the user
-$restricted_projects = '0';
-if (!$perm->have_perm('Admin')) {
- $matching_projects = delimit_list(',',
- $q->grab_field_set("select project_id from ".TBL_PROJECT_GROUP.
- " where group_id not in (".delimit_list(',', $auth->auth['group_ids']).")"));
- if ($matching_projects) {
- $restricted_projects .= ",$matching_projects";
- }
-}
-
// Show the overall bug stats
if (USE_JPGRAPH) {
$t->set_var('sblock', build_image($restricted_projects));
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- include.php 26 Jan 2002 16:46:52 -0000 1.93
+++ include.php 5 Mar 2002 22:11:47 -0000 1.94
@@ -245,4 +245,15 @@
$op = isset($_gv['op']) ? $_gv['op'] : (isset($_pv['op']) ? $_pv['op'] : '');
+// Check to see if we have projects that shouldn't be visible to the user
+$restricted_projects = '0';
+if (!$perm->have_perm('Admin')) {
+ $matching_projects = delimit_list(',',
+ $q->grab_field_set("select project_id from ".TBL_PROJECT_GROUP.
+ " where group_id not in (".delimit_list(',', $auth->auth['group_ids']).")"));
+ if ($matching_projects) {
+ $restricted_projects .= ",$matching_projects";
+ }
+}
+
?>
|