|
From: Benjamin C. <bc...@us...> - 2002-03-11 16:41:17
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv13013
Modified Files:
include.php upgrade.php
Log Message:
Fixes for upgrading
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- include.php 5 Mar 2002 22:11:47 -0000 1.94
+++ include.php 11 Mar 2002 16:41:14 -0000 1.95
@@ -245,14 +245,16 @@
$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";
+if (!defined('NO_AUTH')) {
+ // 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";
+ }
}
}
Index: upgrade.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/upgrade.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- upgrade.php 7 Mar 2002 00:35:38 -0000 1.8
+++ upgrade.php 11 Mar 2002 16:41:14 -0000 1.9
@@ -37,8 +37,8 @@
} else {
$q->query("create table ".TBL_BUG_VOTE." ( user_id int(10) unsigned NOT NULL default '0', bug_id int(10) unsigned NOT NULL default '0', created_date bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (user_id, bug_id), KEY bug_id (bug_id) )");
}
- $q->query("INSERT INTO TBL_CONFIGURATION VALUES ('PROMOTE_VOTES', 5, 'The number of votes required to promote a bug from Unconfirmed to New (Set to 0 to disable promotions by voting)', 'string')");
- $q->query("INSERT INTO TBL_CONFIGURATION VALUES ('MAX_USER_VOTES', 5, 'The maximum number of votes a user can cast across all bugs (Set to 0 to have no limit)', 'string')");
+ $q->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('PROMOTE_VOTES', 5, 'The number of votes required to promote a bug from Unconfirmed to New (Set to 0 to disable promotions by voting)', 'string')");
+ $q->query("INSERT INTO ".TBL_CONFIGURATION." VALUES ('MAX_USER_VOTES', 5, 'The maximum number of votes a user can cast across all bugs (Set to 0 to have no limit)', 'string')");
}
include 'templates/default/upgrade-finished.html';
}
|