You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(34) |
Aug
(215) |
Sep
(180) |
Oct
(135) |
Nov
(105) |
Dec
(81) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(76) |
Feb
(22) |
Mar
(154) |
Apr
(149) |
May
(128) |
Jun
(94) |
Jul
(14) |
Aug
(24) |
Sep
(77) |
Oct
(52) |
Nov
(22) |
Dec
(6) |
| 2003 |
Jan
(4) |
Feb
(10) |
Mar
(6) |
Apr
(29) |
May
(10) |
Jun
(37) |
Jul
(39) |
Aug
(13) |
Sep
(23) |
Oct
(3) |
Nov
(7) |
Dec
(2) |
| 2004 |
Jan
|
Feb
(10) |
Mar
(4) |
Apr
|
May
(35) |
Jun
(4) |
Jul
(17) |
Aug
(6) |
Sep
(14) |
Oct
(18) |
Nov
(2) |
Dec
(14) |
| 2005 |
Jan
(9) |
Feb
(30) |
Mar
(6) |
Apr
|
May
(38) |
Jun
(23) |
Jul
(21) |
Aug
(76) |
Sep
(50) |
Oct
(51) |
Nov
(13) |
Dec
|
|
From: Benjamin C. <bc...@us...> - 2001-12-14 14:42:12
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv17532
Modified Files:
install.php
Log Message:
Tweaks to the download option
Index: install.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/install.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- install.php 2001/12/04 14:27:23 1.7
+++ install.php 2001/12/14 14:42:09 1.8
@@ -50,6 +50,7 @@
'/TBL_CONFIGURATION/' => $_pv['tbl_prefix'].'configuration',
'/TBL_GROUP_PERM/' => $_pv['tbl_prefix'].'group_perm',
'/TBL_OS/' => $_pv['tbl_prefix'].'os',
+ '/TBL_PROJECT_GROUP/' => $_pv['tbl_prefix'].'project_group',
'/TBL_PROJECT/' => $_pv['tbl_prefix'].'project',
'/TBL_RESOLUTION/' => $_pv['tbl_prefix'].'resolution',
'/TBL_SAVED_QUERY/' => $_pv['tbl_prefix'].'saved_query',
@@ -97,7 +98,7 @@
$t->set_root('.');
$t->set_file('content', 'config-dist.php');
$t->set_var($_pv);
- return "<?php\n".$t->finish($t->parse('main', 'content'));
+ return $t->finish($t->parse('main', 'content'));
}
function create_tables() {
@@ -163,14 +164,13 @@
header('Content-Type: text/x-delimtext; name="config.php"');
header('Content-disposition: attachment; filename=config.php');
echo grab_config_file();
- show_finished();
}
function save_config_file() {
if (!check_vars()) return;
create_tables();
- if (!$fp = fopen('config.php', 'w')) {
+ if (!$fp = @fopen('config.php', 'w')) {
show_front('Error writing to config.php');
} else {
fwrite($fp, grab_config_file());
@@ -184,16 +184,7 @@
$t->set_root('templates/default');
$t->set_file('done', 'install-complete.html');
- $t->set_block('done', 'writeableblock', 'writeable');
- $t->set_block('done', 'unwriteableblock', 'unwriteable');
$t->set_var('login', $_pv['admin_login']);
- if (is_writeable('config.php')) {
- $t->parse('writeable', 'writeableblock', true);
- $t->set_var('unwriteable', '');
- } else {
- $t->parse('unwriteable', 'unwriteableblock', true);
- $t->set_var('writeable', '');
- }
print $t->finish($t->parse('main', 'done'));
}
@@ -225,7 +216,7 @@
// If we can write to the config file, show that we will do that, otherwise
// offer the config file as a download
- if (is_writeable('config.php')) {
+ if (@is_writeable('config.php')) {
$t->parse('writeable', 'writeableblock', true);
$t->set_var('unwriteable', '');
} else {
|
|
From: Benjamin C. <bc...@us...> - 2001-12-14 14:41:10
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv17175
Modified Files:
include.php
Log Message:
Ignore the error if config.php isn't present so we can redirect to the installation page
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- include.php 2001/12/10 13:42:39 1.82
+++ include.php 2001/12/14 14:41:06 1.83
@@ -27,7 +27,10 @@
define('INCLUDE_PATH', '');
}
-include (INSTALL_PATH.'/'.INCLUDE_PATH.'config.php');
+if (!@include (INSTALL_PATH.'/'.INCLUDE_PATH.'config.php')) {
+ header("Location: install.php");
+ exit();
+}
if (!defined('DB_HOST')) { // Installation hasn't been completed
header("Location: install.php");
exit();
|
|
From: Benjamin C. <bc...@us...> - 2001-12-14 14:40:22
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv16946 Modified Files: config-dist.php Log Message: Putting the leading <?php in Index: config-dist.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/config-dist.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- config-dist.php 2001/12/04 14:09:36 1.2 +++ config-dist.php 2001/12/14 14:40:19 1.3 @@ -1,4 +1,4 @@ - +<?php // config.php - Set up configuration options // ------------------------------------------------------------------------ // Copyright (c) 2001 The phpBugTracker Group |
|
From: Benjamin C. <bc...@us...> - 2001-12-13 14:07:51
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv16797 Modified Files: CHANGELOG Log Message: Index: CHANGELOG =================================================================== RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- CHANGELOG 2001/12/12 14:42:57 1.34 +++ CHANGELOG 2001/12/13 14:07:47 1.35 @@ -14,7 +14,9 @@ : Added the ability to create user groups and restrict project visibility based on those groups. : When a bug is filed against a component with an owner, that owner will be - assigned the bug and receive an email about the bug + assigned the bug and receive an email about the bug. +: Fixed a bug preventing users from being assigned to the User group when + created. -- 0.5.1 -- 11 Nov 2001 : Fixed a bug (introduced in 0.5.0) with severity color not being pulled in |
|
From: Benjamin C. <bc...@us...> - 2001-12-13 14:06:49
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv16549/admin
Modified Files:
user.php
Log Message:
Always add new users to the User group
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- user.php 2001/11/22 05:14:33 1.33
+++ user.php 2001/12/13 14:06:45 1.34
@@ -59,11 +59,17 @@
values ($new_user_id, '{$_pv['ffirstname']}', '{$_pv['flastname']}',
'$login', '{$_pv['femail']}', '$mpassword', {$_pv['factive']}, $u, $now,
$u, $now)");
+ // Add to the selected groups
foreach ($_pv['fusergroup'] as $group) {
$q->query("insert into ".TBL_USER_GROUP
." (user_id, group_id, created_by, created_date)
values ('$new_user_id' ,'$group', $u, $now)");
}
+ // And add to the user group
+ $q->query("insert into ".TBL_USER_GROUP.
+ " (user_id, group_id, created_by, created_date)
+ select $new_user_id, group_id, $u, $now from ".TBL_AUTH_GROUP.
+ " where group_name = 'User'");
} else {
if (ENCRYPT_PASS) {
$oldpass = $q->grab_field("select password from ".TBL_AUTH_USER
|
|
From: Benjamin C. <bc...@us...> - 2001-12-13 14:00:40
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv15119
Modified Files:
newaccount.php
Log Message:
Fix the insert for the user group
Index: newaccount.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/newaccount.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- newaccount.php 2001/11/19 16:49:20 1.22
+++ newaccount.php 2001/12/13 14:00:35 1.23
@@ -36,9 +36,11 @@
$error = $STRING['givelogin'];
elseif (!$_pv['email'] or !valid_email($_pv['email']))
$error = $STRING['giveemail'];
- elseif ($q->grab_field("select user_id from ".TBL_AUTH_USER." where email = '{$_pv['email']}' or login = '{$_pv['login']}'"))
+ elseif ($q->grab_field("select user_id from ".TBL_AUTH_USER.
+ " where email = '{$_pv['email']}' ".
+ (!empty($_pv['login']) ? "or login = '{$_pv['login']}'" : '')))
$error = $STRING['loginused'];
- if ($error) {
+ if (!empty($error)) {
show_form($error);
return;
}
@@ -58,8 +60,10 @@
$user_id = $q->nextid(TBL_AUTH_USER);
$q->query("insert into ".TBL_AUTH_USER." (user_id, login, first_name, last_name, email, password, active, created_date, last_modified_date)"
." values ($user_id, '$login', '$firstname', '$lastname', '{$_pv['email']}', '$mpassword', 1, $now, $now)");
- $q->query("insert into ".TBL_USER_GROUP." (user_id, group_id)"
- ." select $user_id, group_id from ".TBL_AUTH_GROUP." where group_name = 'user'");
+ $q->query("insert into ".TBL_USER_GROUP.
+ " (user_id, group_id, created_by, created_date)
+ select $user_id, group_id, 0, $now from ".TBL_AUTH_GROUP.
+ " where group_name = 'User'");
mail($_pv['email'], $STRING['newacctsubject'], sprintf($STRING['newacctmessage'],
$password), sprintf("From: %s\nContent-Type: text/plain; charset=%s\nContent-Transfer-Encoding: 8bit\n",ADMIN_EMAIL, $STRING['lang_charset']));
$t->set_file('content','newaccountsuccess.html');
|
|
From: Benjamin C. <bc...@us...> - 2001-12-12 14:43:01
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv4686
Modified Files:
CHANGELOG bug.php
Log Message:
When a bug is filed against a component with an owner, that owner will be assigned the bug and receive an email about the bug
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- CHANGELOG 2001/12/08 14:55:42 1.33
+++ CHANGELOG 2001/12/12 14:42:57 1.34
@@ -13,6 +13,8 @@
: Fixed a rendering problem with bug comments.
: Added the ability to create user groups and restrict project visibility based
on those groups.
+: When a bug is filed against a component with an owner, that owner will be
+ assigned the bug and receive an email about the bug
-- 0.5.1 -- 11 Nov 2001
: Fixed a bug (introduced in 0.5.0) with severity color not being pulled in
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- bug.php 2001/12/10 13:42:03 1.67
+++ bug.php 2001/12/12 14:42:57 1.68
@@ -79,10 +79,13 @@
///
/// Send the email about changes to the bug and log the changes in the DB
-function do_changedfields($userid, $buginfo, $cf, $comments) {
+function do_changedfields($userid, $buginfo, $cf = array(), $comments = '') {
global $q, $t, $u, $select, $now, $STRING;
- $t->set_file('emailout','bugemail.txt');
+ // It's a new bug if the changedfields array is empty and there are no comments
+ $newbug = (!count($cf) and !$comments);
+
+ $t->set_file('emailout', ($newbug ? 'bugemail-newbug.txt' : 'bugemail.txt'));
$t->set_block('emailout','commentblock', 'cblock');
foreach(array('title','url') as $field) {
if (isset($cf[$field])) {
@@ -117,7 +120,7 @@
foreach($cfgDatabase as $field => $table) {
$oldvalue = $q->grab_field("select ${field}_name from $table"
." where ${field}_id = {$buginfo[$field.'_id']}");
- if ($cf[$field.'_id']) {
+ if (!empty($cf[$field.'_id'])) {
$newvalue = $q->grab_field("select ${field}_name from $table"
." where ${field}_id = {$cf[$field.'_id']}");
$q->query('insert into '.TBL_BUG_HISTORY
@@ -142,11 +145,11 @@
$reporterstat = ' ';
$assignedto = $q->grab_field('select email from '.TBL_AUTH_USER
.' where user_id = '
- .($cf['assigned_to'] ? $cf['assigned_to'] : $buginfo['assigned_to']));
- $assignedtostat = $cf['assigned_to'] ? '!' : ' ';
+ .(!empty($cf['assigned_to']) ? $cf['assigned_to'] : $buginfo['assigned_to']));
+ $assignedtostat = !empty($cf['assigned_to']) ? '!' : ' ';
// If there are new comments grab the comments immediately before the latest
- if ($comments) {
+ if ($comments or $newbug) {
$q->query('select u.login, c.comment_text, c.created_date'
.' from '.TBL_COMMENT.' c, '.TBL_AUTH_USER.' u'
." where bug_id = {$buginfo['bug_id']} and c.created_by = u.user_id"
@@ -187,7 +190,7 @@
// behavior toggable by the user)
if ($userid != $buginfo['created_by'])
$maillist[] = $reporter;
- if ($userid != ($cf['assigned_to'] ? $cf['assigned_to'] : $buginfo['assigned_to']))
+ if ($userid != (!empty($cf['assigned_to']) ? $cf['assigned_to'] : $buginfo['assigned_to']))
$maillist[] = $assignedto;
// Collect the CCs
@@ -203,16 +206,17 @@
$t->set_var(array(
'bugid' => $buginfo['bug_id'],
'bugurl' => INSTALL_URL."/bug.php?op=show&bugid={$buginfo['bug_id']}",
- 'priority' => $select['priority'][($cf['priority'] ? $cf['priority'] : $buginfo['priority'])],
- 'priority_stat' => $cf['priority'] ? '!' : ' ',
+ 'priority' => $select['priority'][(!empty($cf['priority']) ? $cf['priority'] : $buginfo['priority'])],
+ 'priority_stat' => !empty($cf['priority']) ? '!' : ' ',
'reporter' => $reporter,
'reporter_stat' => $reporterstat,
'assignedto' => $assignedto,
'assignedto_stat' => $assignedtostat
));
if ($toemail) {
- mail($toemail,"[Bug {$buginfo['bug_id']}] Changed - ".
- ($cf['title'] ? $cf['title'] : $buginfo['title']), $t->parse('main','emailout'),
+ mail($toemail,"[Bug {$buginfo['bug_id']}] ".($newbug ? 'New' : 'Changed').
+ ' - '.(!empty($cf['title']) ? $cf['title'] : $buginfo['title']),
+ $t->parse('main','emailout'),
sprintf("From: %s\nReply-To: %s\nErrors-To: %s\nContent-Type: text/plain; charset=%s\nContent-Transfer-Encoding: 8bit\n", ADMIN_EMAIL, ADMIN_EMAIL,
ADMIN_EMAIL, $STRING['lang_charset']));
}
@@ -223,7 +227,8 @@
// Pull bug from database to determine changed fields and for user validation
$buginfo = $q->grab("select * from ".TBL_BUG." where bug_id = $bugid");
-
+ $changedfields = array();
+
if (isset($GLOBALS['HTTP_POST_VARS'])) {
foreach ($GLOBALS['HTTP_POST_VARS'] as $k => $v) {
$$k = $v;
@@ -279,7 +284,7 @@
}
// Remove CCs if requested
- if (count($remove_cc)) {
+ if (isset($remove_cc) and count($remove_cc)) {
$q->query('delete from '.TBL_BUG_CC." where bug_id = $bugid
and user_id in (".delimit_list(',', $remove_cc).')');
}
@@ -334,7 +339,7 @@
$statusfield = 'Closed';
break;
}
- if ($statusfield) {
+ if (isset($statusfield)) {
$status_id = $q->grab_field("select status_id from ".TBL_STATUS." where status_name = '$statusfield'");
$changedfields['status_id'] = $status_id;
}
@@ -352,18 +357,19 @@
$os_id = $os_id ? $os_id : 0;
$severity_id = $severity_id ? $severity_id : 0;
- $q->query("update ".TBL_BUG." set title = '$title', url = '$url', severity_id = $severity_id, priority = $priority, ".($status_id ? "status_id = $status_id, " : ''). ($changeresolution ? "resolution_id = $resolution_id, " : ''). ($assignedto ? "assigned_to = $assignedto, " : '')." project_id = $project_id, version_id = $version_id, component_id = $component_id, os_id = $os_id, last_modified_by = $u, last_modified_date = $now where bug_id = $bugid");
+ $q->query("update ".TBL_BUG." set title = '$title', url = '$url', severity_id = $severity_id, priority = $priority, ".(isset($status_id) ? "status_id = $status_id, " : ''). ($changeresolution ? "resolution_id = $resolution_id, " : ''). (isset($assignedto) ? "assigned_to = $assignedto, " : '')." project_id = $project_id, version_id = $version_id, component_id = $component_id, os_id = $os_id, last_modified_by = $u, last_modified_date = $now where bug_id = $bugid");
- if ($changedfields or $comments) {
- do_changedfields($u, $buginfo, $changedfields, $comments);
+ if (count($changedfields) or !empty($comments)) {
+ do_changedfields($u, &$buginfo, $changedfields, $comments);
}
header("Location: bug.php?op=show&bugid=$bugid&pos=$pos");
}
function do_form($bugid = 0) {
- global $q, $me, $title, $u, $another, $STRING;
+ global $q, $me, $title, $u, $another, $STRING, $now;
$pv = $GLOBALS['HTTP_POST_VARS'];
+ $error = '';
// Validation
if (!$pv['title'] = htmlspecialchars(trim($pv['title'])))
$error = $STRING['givesummary'];
@@ -374,7 +380,6 @@
while (list($k,$v) = each($pv)) $$k = $v;
if ($url == 'http://') $url = '';
- $time = time();
// Allow for removing of some items from the bug page
$priority = $priority ? $priority : 0;
@@ -382,8 +387,25 @@
$severity = $severity ? $severity : 0;
if (!$bugid) {
- $status = $q->grab_field("select status_id from ".TBL_STATUS." where status_name = 'Unconfirmed'");
- $q->query("insert into ".TBL_BUG." (bug_id, title, description, url, severity_id, priority, status_id, created_by, created_date, last_modified_by, last_modified_date, project_id, version_id, component_id, os_id, browser_string) values (".$q->nextid(TBL_BUG).", '$title', '$description', '$url', $severity, $priority, $status, $u, $time, $u, $time, $project, $version, $component, '$os', '{$GLOBALS['HTTP_USER_AGENT']}')");
+ $bugid = $q->nextid(TBL_BUG);
+
+ // Check to see if this bug's component has an owner and should be assigned
+ if ($owner = $q->grab_field("select owner from ".TBL_COMPONENT.
+ " c where component_id = $component")) {
+ $status = $q->grab_field("select status_id from ".TBL_STATUS." where status_name = 'Assigned'");
+ } else {
+ $owner = 0;
+ $status = $q->grab_field("select status_id from ".TBL_STATUS." where status_name = 'Unconfirmed'");
+ }
+ $q->query("insert into ".TBL_BUG." (bug_id, title, description, url,
+ severity_id, priority, status_id, assigned_to, created_by, created_date,
+ last_modified_by, last_modified_date, project_id, version_id,
+ component_id, os_id, browser_string) values ($bugid, '$title',
+ '$description', '$url', $severity, $priority, $status, $owner, $u,
+ $now, $u, $now, $project, $version, $component, '$os',
+ '{$GLOBALS['HTTP_USER_AGENT']}')");
+ $buginfo = $q->grab('select * from '.TBL_BUG." where bug_id = $bugid");
+ do_changedfields($u, &$buginfo);
} else {
$q->query("update ".TBL_BUG." set title = '$title', description = '$description', url = '$url', severity_id = '$severity', priority = '$priority', status_id = $status, assigned_to = '$assignedto', project_id = $project, version_id = $version, component_id = $component, os_id = '$os', browser_string = '{$GLOBALS['HTTP_USER_AGENT']}' last_modified_by = $u, last_modified_date = $time where bug_id = '$bugid'");
}
|
|
From: Benjamin C. <bc...@us...> - 2001-12-12 14:43:01
|
Update of /cvsroot/phpbt/phpbt/templates/default
In directory usw-pr-cvs1:/tmp/cvs-serv4686/templates/default
Added Files:
bugemail-newbug.txt
Log Message:
When a bug is filed against a component with an owner, that owner will be assigned the bug and receive an email about the bug
--- NEW FILE: bugemail-newbug.txt ---
============================================================================
THIS MESSAGE WAS GENERATED BY THE BUGTRACKER SOFTWARE PLEASE DO NOT REPLY
INSTEAD FOLLOW BUG'S URL BELOW IN ORDER TO DETAIL BUG:
============================================================================
Bug #: {bugid} ({bugurl})
Reported By: {reporter}
----------------------------------------------------------------------------
Summary: {title}
URL: {url}
Product: {project_id}
Version: {version_id}
Component: {component_id}
Status: {status_id}
Resolution: {resolution_id}
Severity: {severity_id}
OS/Version: {os_id}
Priority: {priority}
Assigned To: {assignedto}
============================================================================
<!-- BEGIN commentblock -->
COMMENTS
----- Posted by {oldpostedby} at {oldpostedon} -----
{oldcomments}
<!-- END commentblock -->
|
|
From: Benjamin C. <bc...@us...> - 2001-12-11 13:56:52
|
Update of /cvsroot/phpbt/phpbt/templates/default In directory usw-pr-cvs1:/tmp/cvs-serv16783/templates/default Modified Files: upgrade.html Log Message: Changes for 0.6.0 Index: upgrade.html =================================================================== RCS file: /cvsroot/phpbt/phpbt/templates/default/upgrade.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- upgrade.html 2001/11/06 04:03:28 1.1 +++ upgrade.html 2001/12/11 13:56:48 1.2 @@ -6,7 +6,7 @@ <div align="center"> <br> <br> - This script will upgrade your database from version 0.4.0 to version 0.5.0 + This script will upgrade your database from version 0.5.x to version 0.6.0 of phpBugTracker. <br> <br> |
|
From: Benjamin C. <bc...@us...> - 2001-12-11 13:56:51
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv16783
Modified Files:
upgrade.php
Log Message:
Changes for 0.6.0
Index: upgrade.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/upgrade.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- upgrade.php 2001/11/06 04:41:14 1.3
+++ upgrade.php 2001/12/11 13:56:48 1.4
@@ -28,35 +28,25 @@
function upgrade() {
global $q;
- $upgraded = $q->grab_field("select count(*) from ". TBL_CONFIGURATION.
- " where varname = 'STRICT_UPDATING'");
+ $upgraded = $q->grab_field("select nextid from ". TBL_DB_SEQUENCE.
+ ' where seq_name = "'.TBL_AUTH_GROUP."'");
if (!$upgraded) {
- // Move the support tables to use the table prefix
- // (if the table prefix is non-empty)
- if (strlen(TBL_PREFIX)) {
- $q->Halt_On_Error = 'no'; // We're going to ignore errors
- $db_sess_table = ereg_replace(TBL_PREFIX, '', TBL_ACTIVE_SESSIONS);
- $db_seq_table = ereg_replace(TBL_PREFIX, '', TBL_DB_SEQUENCE);
- $q->query("alter table $db_sess_table rename to ". TBL_ACTIVE_SESSIONS);
- $q->query("alter table $db_seq_table rename to ". TBL_DB_SEQUENCE);
- $q->Halt_On_Error = 'yes'; // Stop ignoring errors
- }
-
- // New configuration options
- $q->query('insert into '. TBL_CONFIGURATION.
- " (varname, varvalue, description, vartype) values ('STRICT_UPDATING', '0',
- 'Only the bug reporter, bug owner, managers, and admins can change a bug',
- 'bool')");
- $q->query('insert into '. TBL_CONFIGURATION.
- " (varname, varvalue, description, vartype) values
- ('NEW_ACCOUNTS_DISABLED', '0',
- 'Only admins can create new user accounts - newaccount.php is disabled',
- 'bool')");
+ // Make changes to the auth_group table
+ $q->query('alter table '.TBL_AUTH_GROUP.' add locked tinyint(1) not null default 0 after group_name');
+ $q->query('update '.TBL_AUTH_GROUP.' set locked = 1');
+ $q->query("insert into db_sequence values('".TBL_AUTH_GROUP."', 3)");
+
+ // New table
+ if (DB_TYPE == 'pgsql') {
+ $q->query("CREATE TABLE ".TBL_PROJECT_GROUP." ( project_id INT4 NOT NULL DEFAULT '0', group_id INT4 NOT NULL DEFAULT '0', created_by INT4 NOT NULL DEFAULT '0', created_date INT8 NOT NULL DEFAULT '0', PRIMARY KEY (project_id,group_id) )");
+ } else {
+ $q->query("create table ".TBL_PROJECT_GROUP." ( project_id int(10) unsigned NOT NULL default '0', group_id int(10) unsigned NOT NULL default '0', created_by int(10) unsigned NOT NULL default '0', created_date bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (project_id,group_id), KEY group_id (group_id) )");
+ }
}
include 'templates/default/upgrade-finished.html';
}
-if ($doit) {
+if (isset($_gv['doit'])) {
upgrade();
} else {
include 'templates/default/upgrade.html';
|
|
From: Benjamin C. <bc...@us...> - 2001-12-10 13:43:50
|
Update of /cvsroot/phpbt/phpbt/inc
In directory usw-pr-cvs1:/tmp/cvs-serv32071/inc
Modified Files:
auth.php
Log Message:
Set up the group_ids array for filtering out anonymous browsers from restricted projects
Index: auth.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/auth.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- auth.php 2001/12/07 14:36:24 1.3
+++ auth.php 2001/12/10 13:43:46 1.4
@@ -33,6 +33,7 @@
if (!$sess->is_registered('auth')) {
$sess->register('auth');
+ $this->auth['group_ids'] = array(0);
}
if ($this->is_authenticated()) {
|
|
From: Benjamin C. <bc...@us...> - 2001-12-10 13:42:42
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv31807
Modified Files:
include.php
Log Message:
Cleanup
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -r1.81 -r1.82
--- include.php 2001/12/08 14:55:42 1.81
+++ include.php 2001/12/10 13:42:39 1.82
@@ -484,7 +484,7 @@
function maskemail($email) {
global $auth;
- if (HIDE_EMAIL && !$auth->auth['uid']) {
+ if (HIDE_EMAIL && empty($auth->auth['uid'])) {
return '******';
} elseif (MASK_EMAIL) {
return str_replace('@', ' at ', str_replace('.', ' dot ', $email));
|
|
From: Benjamin C. <bc...@us...> - 2001-12-10 13:42:06
|
Update of /cvsroot/phpbt/phpbt/languages In directory usw-pr-cvs1:/tmp/cvs-serv31619/languages Modified Files: de.php en.php fr.php gb2312.php no.php pt-br.php ru_koi8-r.php ru_windows-1251.php se.php Log Message: Move "Previous" and "Next" bug link text to the language files Index: de.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/de.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- de.php 2001/12/06 14:28:21 1.7 +++ de.php 2001/12/10 13:42:04 1.8 @@ -66,7 +66,9 @@ 'bad_attachment' => 'Dieser Dateianhang existiert nicht', 'attachment_too_large' => 'Die angegebene Datei ist größer als '.number_format(ATTACHMENT_MAX_SIZE).' bytes', 'bad_permission' => 'Sie haben nicht die erforderlichen Rechte für diese Funktion', - 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen' + 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen', + 'previous_bug' => 'Previous', + 'next_bug' => 'Next' ); // Page titles Index: en.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/en.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- en.php 2001/12/06 14:28:21 1.7 +++ en.php 2001/12/10 13:42:04 1.8 @@ -63,7 +63,9 @@ 'bad_attachment' => 'That attachment does not exist', 'attachment_too_large' => 'The file you specified is larger than '.number_format(ATTACHMENT_MAX_SIZE).' bytes', 'bad_permission' => 'You do not have the permissions required for that function', - 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen' + 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen', + 'previous_bug' => 'Previous', + 'next_bug' => 'Next' ); // Page titles Index: fr.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/fr.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- fr.php 2001/12/06 14:28:21 1.4 +++ fr.php 2001/12/10 13:42:04 1.5 @@ -64,7 +64,9 @@ 'attachment_too_large' => 'Le fichier envoyé dépasse la limite des '.number_format(ATTACHMENT_MAX_SIZE).' octets', 'bad_permission' => 'Vous n\'avez pas les droits pour réaliser cette action', 'noseverities' => 'Pas de criticités trouvées', - 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen' + 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen', + 'previous_bug' => 'Previous', + 'next_bug' => 'Next' ); // Page titles Index: gb2312.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/gb2312.php,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- gb2312.php 2001/12/06 14:28:21 1.3 +++ gb2312.php 2001/12/10 13:42:04 1.4 @@ -66,7 +66,9 @@ 'bad_attachment' => '¸½¼þ²»´æÔÚ', 'attachment_too_large' => 'ÄúÉÏÔØµÄ¸½¼þ´óÓÚ '.number_format(ATTACHMENT_MAX_SIZE).' ×Ö½Ú', 'bad_permission' => 'ÄúûÓÐʹÓÃÕâ¸ö¹¦ÄܵÄȨÏÞ', - 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen' + 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen', + 'previous_bug' => 'Previous', + 'next_bug' => 'Next' ); // Page titles Index: no.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/no.php,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- no.php 2001/12/06 14:28:21 1.6 +++ no.php 2001/12/10 13:42:04 1.7 @@ -64,7 +64,9 @@ 'attachment_too_large' => 'Filen du har spesifisert er større enn '.number_format(ATTACHMENT_MAX_SIZE).' bytes', 'bad_permission' => 'Du har ikke de nødvendige rettighetene til det', 'noseverities' => 'Ingen alvorligheter funnet', - 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen' + 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen', + 'previous_bug' => 'Previous', + 'next_bug' => 'Next' ); // Page titles Index: pt-br.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/pt-br.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- pt-br.php 2001/12/06 14:28:21 1.7 +++ pt-br.php 2001/12/10 13:42:04 1.8 @@ -64,7 +64,9 @@ 'bad_attachment' => 'Este anexo não existe', 'attachment_too_large' => 'O arquivo escolhido é maior que '.number_format(ATTACHMENT_MAX_SIZE).' bytes', 'bad_permission' => 'Você não tem as permissões necessárias para essa função', - 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen' + 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen', + 'previous_bug' => 'Previous', + 'next_bug' => 'Next' ); // Page titles Index: ru_koi8-r.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/ru_koi8-r.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ru_koi8-r.php 2001/12/06 14:28:21 1.5 +++ ru_koi8-r.php 2001/12/10 13:42:04 1.6 @@ -63,7 +63,9 @@ 'bad_attachment' => 'ôÁËÏÇÏ ÐÒÉÌÏÖÅÎÉÑ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ', 'attachment_too_large' => 'õËÁÚÁÎÎÙÊ ÆÁÊÌ ÉÍÅÅÔ ÒÁÚÍÅÒ ÂÏÌØÛÅ ÞÅÍ '.number_format(ATTACHMENT_MAX_SIZE).' ÂÁÊÔ', 'bad_permission' => 'õ ×ÁÓ ÎÅÔ ÐÏÌÎÏÍÏÞÉÊ, ÎÅÏÂÈÏÄÉÍÙÈ ÄÌÑÄÁÎÎÏÊ ÆÕÎËÃÉÉ', - 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen' + 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen', + 'previous_bug' => 'Previous', + 'next_bug' => 'Next' ); // Page titles Index: ru_windows-1251.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/ru_windows-1251.php,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ru_windows-1251.php 2001/12/06 14:28:21 1.5 +++ ru_windows-1251.php 2001/12/10 13:42:04 1.6 @@ -63,7 +63,9 @@ 'bad_attachment' => 'Òàêîãî ïðèëîæåíèÿ íå ñóùåñòâóåò', 'attachment_too_large' => 'Óêàçàííûé ôàéë èìååò ðàçìåð áîëüøå ÷åì '.number_format(ATTACHMENT_MAX_SIZE).' áàéò', 'bad_permission' => 'Ó âàñ íåò ïîëíîìî÷èé, íåîáõîäèìûõ äëÿäàííîé ôóíêöèè', - 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen' + 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen', + 'previous_bug' => 'Previous', + 'next_bug' => 'Next' ); // Page titles Index: se.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/se.php,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- se.php 2001/12/06 14:28:21 1.7 +++ se.php 2001/12/10 13:42:04 1.8 @@ -64,7 +64,9 @@ 'bad_attachment' => 'Bilagan existerar inte', 'attachment_too_large' => 'Filen du angav är större än '.number_format(ATTACHMENT_MAX_SIZE).' bytes', 'bad_permission' => 'Du har inte den behövliga behörigheten för att använda den funktionen', - 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen' + 'project_only_all_groups' => 'You cannot choose specific groups when "All Groups" is chosen', + 'previous_bug' => 'Previous', + 'next_bug' => 'Next' ); // Page titles |
|
From: Benjamin C. <bc...@us...> - 2001-12-10 13:42:06
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv31619
Modified Files:
bug.php
Log Message:
Move "Previous" and "Next" bug link text to the language files
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- bug.php 2001/12/07 14:36:23 1.66
+++ bug.php 2001/12/10 13:42:03 1.67
@@ -518,7 +518,7 @@
///
/// Grab the links for the previous and next bugs in the list
function prev_next_links($bugid, $pos) {
- global $q, $queryinfo;
+ global $q, $queryinfo, $STRING;
if (!isset($queryinfo['query']) || !$queryinfo['query']) {
return array('', '');
@@ -550,14 +550,17 @@
if ($pos) {
if ($firstid) {
- $prevlink = "<a href='bug.php?op=show&bugid=$firstid&pos=".($pos - 1).'\'>Previous</a>';
+ $prevlink = "<a href='bug.php?op=show&bugid=$firstid&pos=".($pos - 1).
+ '\'>'.$STRING['previous_bug'].'</a>';
}
if ($secondid) {
- $nextlink = "<a href='bug.php?op=show&bugid=$secondid&pos=".($pos + 1).'\'>Next</a>';
+ $nextlink = "<a href='bug.php?op=show&bugid=$secondid&pos=".($pos + 1).
+ '\'>'.$STRING['next_bug'].'</a>';
}
} else {
if ($firstid) {
- $nextlink = "<a href='bug.php?op=show&bugid=$firstid&pos=".($pos + 1).'\'>Next</a>';
+ $nextlink = "<a href='bug.php?op=show&bugid=$firstid&pos=".($pos + 1).
+ '\'>'.$STRING['next_bug'].'</a>';
}
}
|
|
From: Ben C. <php...@be...> - 2001-12-08 20:25:31
|
The long awaited (grin) project group filtering is now in cvs. You can administer groups via admin/group.php and set up projects to only be visible to certain groups of users in the project admin. Please play with these changes to see if I missed or broke something. I'm shooting for a release of 0.6.0 by the end of next week, hopefully with fixes to initial email generation on bug submission and some new reports. |
|
From: Benjamin C. <bc...@us...> - 2001-12-08 14:55:46
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv11375
Modified Files:
CHANGELOG include.php query.php
Log Message:
Project visibility based on user groups
Index: CHANGELOG
===================================================================
RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- CHANGELOG 2001/12/05 14:00:14 1.32
+++ CHANGELOG 2001/12/08 14:55:42 1.33
@@ -11,6 +11,8 @@
the configuration page.
: Multiple bugs related to the bug query page fixed.
: Fixed a rendering problem with bug comments.
+: Added the ability to create user groups and restrict project visibility based
+ on those groups.
-- 0.5.1 -- 11 Nov 2001
: Fixed a bug (introduced in 0.5.0) with severity color not being pulled in
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- include.php 2001/12/06 14:28:31 1.80
+++ include.php 2001/12/08 14:55:42 1.81
@@ -236,7 +236,7 @@
///
/// Build a select box with the item matching $value selected
function build_select($box, $value = '', $project = 0) {
- global $q, $select;
+ global $q, $select, $perm, $auth;
//create hash to map tablenames
$cfgDatabase = array(
@@ -257,7 +257,13 @@
'severity' => $querystart.' where sort_order > 0 order by sort_order',
'status' => $querystart.' where sort_order > 0 order by sort_order',
'resolution' => $querystart.' where sort_order > 0 order by sort_order',
- 'project' => $querystart." where active > 0 order by {$box}_name",
+ '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',
'component' => $querystart." where project_id = $project order by {$box}_name",
'version' => $querystart." where project_id = $project order by {$box}_name"
);
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- query.php 2001/12/08 14:28:16 1.46
+++ query.php 2001/12/08 14:55:42 1.47
@@ -33,7 +33,8 @@
}
function show_query() {
- global $q, $t, $status, $resolution, $os, $priority, $severity, $TITLE, $u;
+ global $q, $t, $status, $resolution, $os, $priority, $severity, $TITLE, $u,
+ $perm, $auth;
$nq = new dbclass;
$js = '';
@@ -43,8 +44,16 @@
$t->set_block('savequeryblock','row','rows');
// Build the javascript-powered select boxes
- $q->query("select project_id, project_name from ".TBL_PROJECT.
- " where active = 1 order by project_name");
+ if ($perm->have_perm('Admin')) {
+ $q->query("select project_id, project_name from ".TBL_PROJECT.
+ " where active = 1 order by project_name");
+ } else {
+ $q->query('select p.project_id, project_name from '.TBL_PROJECT.
+ ' p left join '.TBL_PROJECT_GROUP.' pg using(project_id)
+ where active = 1 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');
+ }
while (list($pid, $pname) = $q->grab()) {
// Version array
$js .= "versions['$pname'] = new Array(new Array('','All'),";
@@ -101,7 +110,7 @@
}
function build_query($assignedto, $reportedby, $open) {
- global $q, $auth, $_gv;
+ global $q, $auth, $_gv, $perm, $auth;
foreach ($_gv as $k => $v) { $$k = $v; }
@@ -156,6 +165,13 @@
if ($versions) $proj[] = "b.version_id = $versions";
if ($components) $proj[] = "component_id = $components";
$query[] = '('.delimit_list(' and ',$proj).')';
+ } elseif (!$perm->have_perm('Admin')) { // Filter results from hidden projects
+ $query[] = 'b.project_id in ('.
+ delimit_list(',', $q->grab_field_set('select p.project_id
+ from '.TBL_PROJECT.' 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')).
+ ')';
}
}
|
|
From: Benjamin C. <bc...@us...> - 2001-12-08 14:28:20
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv6707
Modified Files:
query.php
Log Message:
That mouseover got annoying
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -r1.45 -r1.46
--- query.php 2001/11/30 17:27:28 1.45
+++ query.php 2001/12/08 14:28:16 1.46
@@ -322,7 +322,7 @@
));
$t->parse('cols', 'col', true);
}
- $t->set_var('tr-extra', "class='$trclass' bgcolor='$bgcolor' onClick=\"document.location.href='bug.php?op=show&bugid={$row['bug_id']}'\" onMouseOver=\"this.style.fontWeight='bold'\" onMouseOut=\"this.style.fontWeight='normal'\"");
+ $t->set_var('tr-extra', "class='$trclass' bgcolor='$bgcolor' onClick=\"document.location.href='bug.php?op=show&bugid={$row['bug_id']}'\"");
$t->parse('rows','row',true);
$t->set_var('cols', '');
++$pos;
|
|
From: Benjamin C. <bc...@us...> - 2001-12-07 14:36:29
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv17792
Modified Files:
bug.php
Log Message:
Getting started on the user side of the project group restrictions
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- bug.php 2001/12/07 14:01:26 1.65
+++ bug.php 2001/12/07 14:36:23 1.66
@@ -709,14 +709,25 @@
}
function show_projects() {
- global $me, $q, $t, $project, $STRING, $TITLE;
+ global $me, $q, $t, $project, $STRING, $TITLE, $perm, $auth;
// Show only active projects with at least one component
- $q->query('select p.project_id, p.project_name, p.project_desc, p.created_date
- from '.TBL_PROJECT.' p, '.TBL_COMPONENT.
- ' c where p.active = 1 and p.project_id = c.project_id group by
- p.project_id, p.project_name, p.project_desc, p.created_date
- order by project_name');
+ if ($perm->have_perm('Admin')) { // Show admins all projects
+ $q->query('select p.project_id, p.project_name, p.project_desc, p.created_date
+ from '.TBL_PROJECT.' p, '.TBL_COMPONENT.
+ ' c where p.active = 1 and p.project_id = c.project_id group by
+ p.project_id, p.project_name, p.project_desc, p.created_date
+ order by project_name');
+ } else { // Filter out projects that can't be seen by this user
+ $q->query('select p.project_id, p.project_name, p.project_desc, p.created_date
+ from '.TBL_PROJECT.' p left join '.TBL_PROJECT_GROUP.' pg
+ using(project_id), '.TBL_COMPONENT.' c
+ where p.active = 1 and p.project_id = c.project_id
+ 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, p.project_desc, p.created_date
+ order by project_name');
+ }
switch ($q->num_rows()) {
case 0 :
$t->set_var('rows',$STRING['noprojects']);
|
|
From: Benjamin C. <bc...@us...> - 2001-12-07 14:36:28
|
Update of /cvsroot/phpbt/phpbt/inc
In directory usw-pr-cvs1:/tmp/cvs-serv17792/inc
Modified Files:
auth.php
Log Message:
Getting started on the user side of the project group restrictions
Index: auth.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/inc/auth.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- auth.php 2001/11/14 14:28:06 1.2
+++ auth.php 2001/12/07 14:36:24 1.3
@@ -63,16 +63,17 @@
if (!$q->num_rows()) {
return 0;
} else {
- $this->auth['db_fields'] = unserialize($u['bug_list_fields']);
+ $this->auth['db_fields'] = @unserialize($u['bug_list_fields']);
// Grab group assignments and permissions based on groups
- $q->query("select group_name, perm_name"
+ $q->query("select gp.group_id, group_name, perm_name"
." from ".TBL_AUTH_PERM." ap, ".TBL_GROUP_PERM." gp, ".TBL_AUTH_GROUP." ag, ".TBL_USER_GROUP." ug"
." where ap.perm_id = gp.perm_id and gp.group_id = ag.group_id"
." and ag.group_id = ug.group_id and ug.user_id = {$u['user_id']}");
- while (list($group, $perm) = $q->grab()) {
+ while (list($groupid, $group, $perm) = $q->grab()) {
$this->auth['perm'][$perm] = true;
$this->auth['group'][$group] = true;
+ $this->auth['group_ids'][] = $groupid;
}
return $u['user_id'];
|
|
From: Benjamin C. <bc...@us...> - 2001-12-07 14:18:26
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv6242/admin
Modified Files:
project.php
Log Message:
Cleanup
Index: project.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/project.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- project.php 2001/12/06 14:28:31 1.27
+++ project.php 2001/12/07 14:18:22 1.28
@@ -190,7 +190,7 @@
$error['project'] = $STRING['givename'];
} elseif (!$_pv['description'] = htmlspecialchars(trim($_pv['description']))) {
$error['project'] = $STRING['givedesc'];
- } elseif (is_array($_pv['usergroup']) and
+ } elseif (isset($_pv['usergroup']) and is_array($_pv['usergroup']) and
in_array('all', $_pv['usergroup']) and count($_pv['usergroup']) > 1) {
$error['project'] = $STRING['project_only_all_groups'];
}
@@ -231,7 +231,7 @@
// Handle project -> group relationship
$old_usergroup = $q->grab_field_set('select group_id from '.TBL_PROJECT_GROUP.
" where project_id = $projectid");
- if (is_array($usergroup) and count($usergroup)) {
+ if (isset($usergroup) and is_array($usergroup) and count($usergroup)) {
if (in_array('all', $usergroup)) {
// User selected 'All groups'
if (count($old_usergroup)) {
|
|
From: Benjamin C. <bc...@us...> - 2001-12-07 14:01:29
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv1440
Modified Files:
bug.php
Log Message:
Need $STRING for the charset variable in mail() -- Noticed by Brent
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- bug.php 2001/12/05 04:21:19 1.64
+++ bug.php 2001/12/07 14:01:26 1.65
@@ -80,7 +80,7 @@
///
/// Send the email about changes to the bug and log the changes in the DB
function do_changedfields($userid, $buginfo, $cf, $comments) {
- global $q, $t, $u, $select, $now;
+ global $q, $t, $u, $select, $now, $STRING;
$t->set_file('emailout','bugemail.txt');
$t->set_block('emailout','commentblock', 'cblock');
|
|
From: Benjamin C. <bc...@us...> - 2001-12-06 14:35:12
|
Update of /cvsroot/phpbt/phpbt/schemas In directory usw-pr-cvs1:/tmp/cvs-serv8071 Modified Files: mysql.in Log Message: arg Index: mysql.in =================================================================== RCS file: /cvsroot/phpbt/phpbt/schemas/mysql.in,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- mysql.in 2001/12/06 14:28:31 1.11 +++ mysql.in 2001/12/06 14:35:08 1.12 @@ -176,6 +176,8 @@ CREATE TABLE TBL_PROJECT_GROUP ( project_id int(10) unsigned NOT NULL default '0', group_id int(10) unsigned NOT NULL default '0', + created_by int(10) unsigned NOT NULL default '0', + created_date bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (project_id,group_id), KEY group_id (group_id) ) TYPE=MyISAM; |
|
From: Benjamin C. <bc...@us...> - 2001-12-06 14:30:30
|
Update of /cvsroot/phpbt/phpbt/schemas In directory usw-pr-cvs1:/tmp/cvs-serv6773 Removed Files: mysql.0.2.x-0.3.0.in mysql.0.3.x-0.4.0.in pgsql.0.2.x-0.3.0.in pgsql.0.3.x-0.4.0.in Log Message: Cleanup --- mysql.0.2.x-0.3.0.in DELETED --- --- mysql.0.3.x-0.4.0.in DELETED --- --- pgsql.0.2.x-0.3.0.in DELETED --- --- pgsql.0.3.x-0.4.0.in DELETED --- |
|
From: Benjamin C. <bc...@us...> - 2001-12-06 14:28:35
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv6198/admin
Modified Files:
project.php
Log Message:
Changes for project -> group management
Index: project.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/project.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- project.php 2001/11/22 05:14:33 1.26
+++ project.php 2001/12/06 14:28:31 1.27
@@ -184,12 +184,16 @@
function save_project($projectid = 0) {
global $q, $me, $u, $STRING, $now, $_pv;
+ $error = '';
// Validation
if (!$_pv['name'] = htmlspecialchars(trim($_pv['name']))) {
$error['project'] = $STRING['givename'];
} elseif (!$_pv['description'] = htmlspecialchars(trim($_pv['description']))) {
$error['project'] = $STRING['givedesc'];
- }
+ } elseif (is_array($_pv['usergroup']) and
+ in_array('all', $_pv['usergroup']) and count($_pv['usergroup']) > 1) {
+ $error['project'] = $STRING['project_only_all_groups'];
+ }
if ($error) { show_project($projectid, $error); return; }
if (!$projectid) {
@@ -223,12 +227,48 @@
." set project_name = '$name', project_desc = '$description',
active = $active where project_id = $projectid");
}
+
+ // Handle project -> group relationship
+ $old_usergroup = $q->grab_field_set('select group_id from '.TBL_PROJECT_GROUP.
+ " where project_id = $projectid");
+ if (is_array($usergroup) and count($usergroup)) {
+ if (in_array('all', $usergroup)) {
+ // User selected 'All groups'
+ if (count($old_usergroup)) {
+ $q->query('delete from '.TBL_PROJECT_GROUP." where project_id = $projectid");
+ }
+ } else {
+ // Compute differences between old and new
+ $remove_from = array_diff($old_usergroup, $usergroup);
+ $add_to = array_diff($usergroup, $old_usergroup);
+
+ if (count($remove_from)) {
+ foreach ($remove_from as $group) {
+ $q->query('delete from '.TBL_PROJECT_GROUP." where project_id = $projectid
+ and group_id = $group");
+ }
+ }
+ if (count($add_to)) {
+ foreach ($add_to as $group) {
+ $q->query("insert into ".TBL_PROJECT_GROUP
+ ." (project_id, group_id, created_by, created_date)
+ values ('$projectid' ,'$group', $u, $now)");
+ }
+ }
+ }
+ } elseif (count($old_usergroup)) {
+ // User selected nothing, so consider it 'All groups'
+ $q->query('delete from '.TBL_PROJECT_GROUP." where project_id = $projectid");
+ }
+
header("Location: $me?op=edit&id=$projectid");
}
function show_project($projectid = 0, $error = array()) {
global $q, $me, $t, $name, $description, $active, $TITLE, $_gv;
+ $proj_groups = $q->grab_field_set('select group_id from '.TBL_PROJECT_GROUP.
+ " where project_id = $projectid");
if ($projectid && !$error) {
$row = $q->grab('select * from '.TBL_PROJECT
." where project_id = $projectid");
@@ -237,15 +277,17 @@
'name' => $row['project_name'],
'description' => $row['project_desc'],
'active' => $row['active'] ? 'checked' : '',
+ 'usergroup' => build_select('group', $proj_groups, 1),
'TITLE' => $TITLE['editproject']
));
} else {
$t->set_var(array(
- 'error' => $error['project'],
+ 'error' => !empty($error['project']) ? $error['project'] : '',
'projectid' => $projectid,
'name' => stripslashes($name),
'description' => stripslashes($description),
'active' => (isset($active) and !$active) ? '' : 'checked',
+ 'usergroup' => build_select('group', $proj_groups, 1),
'TITLE' => $projectid ? $TITLE['editproject'] : $TITLE['addproject']
));
}
|
|
From: Benjamin C. <bc...@us...> - 2001-12-06 14:28:35
|
Update of /cvsroot/phpbt/phpbt/templates/default/admin
In directory usw-pr-cvs1:/tmp/cvs-serv6198/templates/default/admin
Modified Files:
project-edit.html
Log Message:
Changes for project -> group management
Index: project-edit.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/admin/project-edit.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- project-edit.html 2001/10/11 14:24:04 1.1
+++ project-edit.html 2001/12/06 14:28:32 1.2
@@ -1,22 +1,38 @@
<form action="project.php" method="post">
<input type="hidden" name="id" value="{projectid}">
<input type="hidden" name="do" value="project">
-<table border='0'>
-<tr>
- <td colspan="2"><font color="#ff0000">{error}</td>
-</tr>
-<tr>
- <td align="right" valign="top">Name:</td>
- <td><input type="text" size="30" maxlength="30" name="name" value="{name}"></td>
-</tr>
-<tr>
- <td align="right" valign="top">Description:</td>
- <td><textarea name="description" cols=40 rows=5 wrap=virtual>{description}</textarea></td>
-</tr>
-<tr>
- <td align="right" valign="top">Active:</td>
- <td align="left" valign="top"><input type="checkbox" name="active" value="1" {active}></td>
-</tr>
+<table border="0" cellpadding="2" cellspacing="2" width="640">
+ <tr>
+ <td colspan="2"><div class="error">{error}</div></td>
+ </tr>
+ <tr>
+ <td valign="top" width="360">
+ Name:
+ <br>
+ <input type="text" size="30" maxlength="30" name="name" value="{name}">
+ </td>
+ <td valign="top" rowspan="3">
+ Only users in the following groups can see this project:
+ <br>
+ <select name="usergroup[]" size="10" multiple>
+ {usergroup}
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ Description:
+ <br>
+ <textarea name="description" cols=40 rows=5 wrap=virtual>{description}</textarea>
+ </td>
+ </tr>
+ <tr>
+ <td valign="top">
+ Active:
+ <br>
+ <input type="checkbox" name="active" value="1" {active}>
+ </td>
+ </tr>
</table>
<input type='submit' name='submit' value='Submit'>
</form>
@@ -26,7 +42,7 @@
<td width="320" valign="top">
<b>{vf_action} Version</b>
<hr width="320" size="1" align="center">
- <font color="#ff0000">{vf_error}</font>
+ <div class="error">{vf_error}</div>
<table border="0">
<form action="{me}" method="post">
<input type="hidden" name="do" value="version">
@@ -52,7 +68,7 @@
<td width="320" valign="top">
<b>{cf_action} Component</b>
<hr width="320" size="1" align="center">
- <font color="#ff0000">{cf_error}</font>
+ <div class="error">{cf_error}</div>
<table border="0">
<form action="{me}" method="post">
<input type="hidden" name="do" value="component">
|