|
From: Benjamin C. <bc...@us...> - 2002-04-04 15:35:17
|
Update of /cvsroot/phpbt/phpbt/inc/db In directory usw-pr-cvs1:/tmp/cvs-serv3374/inc/db Modified Files: mysql.php oci8.php pgsql.php Log Message: Prevent going directly to a bug that is not visible because it belongs to a group that is not visible Index: mysql.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/mysql.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- mysql.php 4 Apr 2002 13:30:17 -0000 1.5 +++ mysql.php 4 Apr 2002 13:54:03 -0000 1.6 @@ -56,7 +56,8 @@ 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. TBL_SEVERITY.' sv, '.TBL_STATUS.' st, '.TBL_OS.' os, '. TBL_VERSION.' v, '. TBL_COMPONENT.' c, '.TBL_PROJECT.' p '. - 'where bug_id = %s and b.severity_id = sv.severity_id '. + 'where bug_id = %s and b.project_id not in (%s) '. + 'and b.severity_id = sv.severity_id '. 'and b.os_id = os.os_id and b.version_id = v.version_id '. 'and b.component_id = c.component_id and b.project_id = p.project_id '. 'and b.status_id = st.status_id', @@ -83,8 +84,8 @@ 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. TBL_SEVERITY.' sv, '.TBL_STATUS.' st '. - 'where bug_id = %s and b.severity_id = sv.severity_id '. - 'and b.status_id = st.status_id', + 'where bug_id = %s and b.project_id not in (%s) '. + 'and b.severity_id = sv.severity_id and b.status_id = st.status_id', 'functions-bug-cc' => 'select b.user_id, login '. 'from '.TBL_BUG_CC.' b left join '. TBL_AUTH_USER.' using(user_id) '. 'where bug_id = %s', Index: oci8.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/oci8.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- oci8.php 4 Apr 2002 13:30:17 -0000 1.4 +++ oci8.php 4 Apr 2002 13:54:03 -0000 1.5 @@ -62,7 +62,7 @@ 'and b.resolution_id = r.resolution_id(+) and b.os_id = os.os_id '. 'and b.version_id = v.version_id and b.component_id = c.component_id '. 'and b.project_id = p.project_id and b.severity_id = sv.severity_id '. - 'and b.status_id = st.status_id and bug_id = %s', + 'and b.status_id = st.status_id and bug_id = %s and b.project_id not in (%s)', 'bug-prev-next' => 'select b.bug_id, reporter.login as reporter, '. 'owner.login as owner '. 'from '.TBL_BUG.' b, '.TBL_AUTH_USER.' owner, '.TBL_AUTH_USER.' reporter, '. @@ -88,7 +88,7 @@ 'and b.assigned_to = owner.user_id(+) '. 'and b.created_by = reporter.user_id(+) '. 'and b.severity_id = sv.severity_id and b.status_id = st.status_id '. - 'and bug_id = %s', + 'and bug_id = %s and b.project_id not in (%s)', 'functions-bug-cc' => 'select b.user_id, login '. 'from '.TBL_BUG_CC.' b, '. TBL_AUTH_USER. ' where phpbt_auth_user.user_id = b.user_id(+) and bug_id = %s', Index: pgsql.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/db/pgsql.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- pgsql.php 4 Apr 2002 13:30:17 -0000 1.6 +++ pgsql.php 4 Apr 2002 13:54:03 -0000 1.7 @@ -56,7 +56,8 @@ 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. TBL_SEVERITY.' sv, '.TBL_STATUS.' st, '.TBL_OS.' os, '. TBL_VERSION.' v, '. TBL_COMPONENT.' c, '.TBL_PROJECT.' p '. - 'where bug_id = %s and b.severity_id = sv.severity_id '. + 'where bug_id = %s and b.project_id not in (%s) '. + 'and b.severity_id = sv.severity_id '. 'and b.os_id = os.os_id and b.version_id = v.version_id '. 'and b.component_id = c.component_id and b.project_id = p.project_id '. 'and b.status_id = st.status_id', @@ -83,8 +84,8 @@ 'left join '.TBL_AUTH_USER.' reporter on b.created_by = reporter.user_id '. 'left join '.TBL_RESOLUTION.' r on b.resolution_id = r.resolution_id, '. TBL_SEVERITY.' sv, '.TBL_STATUS.' st '. - 'where bug_id = %s and b.severity_id = sv.severity_id '. - 'and b.status_id = st.status_id', + 'where bug_id = %s and b.project_id not in (%s) '. + 'and b.severity_id = sv.severity_id and b.status_id = st.status_id', 'functions-bug-cc' => 'select b.user_id, login '. 'from '.TBL_BUG_CC.' b left join '. TBL_AUTH_USER.' using(user_id) '. 'where bug_id = %s', |