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-09-07 13:09:53
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv24373/admin
Modified Files:
user.php
Log Message:
A little clean-up
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- user.php 2001/09/07 08:47:04 1.24
+++ user.php 2001/09/07 13:09:49 1.25
@@ -76,8 +76,9 @@
$pquery = "password = '{$_pv['fpassword']}',";
}
$q->query("update ".TBL_AUTH_USER." set first_name = '{$_pv['ffirstname']}',
- last_name = '{$_pv['flastname']}',login = '$login', email = '{$_pv['femail']}', $pquery
- active = {$_pv['factive']} where user_id = '$userid'");
+ last_name = '{$_pv['flastname']}', login = '$login',
+ email = '{$_pv['femail']}', $pquery active = {$_pv['factive']}
+ where user_id = '$userid'");
// Update group memberships
// Get user's groups (without dropping the user group)
@@ -210,8 +211,7 @@
'name' => stripslashes($row['fullname']),
'email' => $row['email'],
'active' => $row['active'] ? 'Yes' : 'No',
- //'usergroup' => $q->grab_field('select group_name from '.TBL_AUTH_GROUP.' ag, '.TBL_USER_GROUP.' ug where user_id='.$row['user_id'].' and ag.group_id = ug.group_id limit 1'),
- 'date' => date(DATEFORMAT,$row['created_date'])));
+ 'date' => date(DATEFORMAT, $row['created_date'])));
$t->parse('rows','row',true);
}
@@ -234,4 +234,4 @@
page_close();
-?>
\ No newline at end of file
+?>
|
|
From: Patrick M. <mai...@st...> - 2001-09-07 11:57:47
|
now, that it's possible to tell phpbt to use other tablenames createdb.sql
still creates hard coded names. to make this part dynamic we need some
kind of template for createdb.sql, for example createdb.sql.template,
which contains entries like
DROP TABLE IF EXISTS TBL_OS;
CREATE TABLE TBL_OS (
Those enrtries like TBL_OS have to be replaced by real tablenames.
Therefor I could create a shell-script like the following
PREFIX="phpbt_"
cat createdb.sql.template | sed "
s/TBL_OS/${PREFIX}os/g
s/TBL_BUG/${PREFIX}bug/g
" > createdb.sql
this script can be modified to use an argument as prefix and can be used
in configure.
it could be a function, but I would like to have a script independent
from configure to create the createdb.sql.
what do you think?
Should this go in this release or the next?
--
http://home.nikocity.de/mairif
http://www.caravan-network.de
|
|
From: Patrick M. <mai...@st...> - 2001-09-07 11:10:17
|
Hi, has anyone thought about writing a documentation? I would suggest a users-guide, a database-documentation and one for the code. maybe the last one could be automatically generated by phpdoc or sth. What do you think? I think it would be an important thing. -- http://home.nikocity.de/mairif http://www.caravan-network.de |
|
From: Javier S. <ja...@us...> - 2001-09-07 08:47:07
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv14656
Modified Files:
user.php
Log Message:
Debug EMAIL_IS_LOGIN <> LOGIN_IS_MAIL pb :-)
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- user.php 2001/09/03 20:28:43 1.23
+++ user.php 2001/09/07 08:47:04 1.24
@@ -29,44 +29,44 @@
global $q, $me, $_pv, $STRING, $now, $u;
// Validation
- if (!LOGIN_IS_EMAIL && !$_pv['flogin'] = trim($_pv['flogin'])) {
- $error = $STRING['givelogin'];
- } elseif (!valid_email($_pv['femail'])) {
+ if (!LOGIN_IS_EMAIL && !$_pv['flogin'] = trim($_pv['flogin'])) {
+ $error = $STRING['givelogin'];
+ } elseif (!valid_email($_pv['femail'])) {
$error = $STRING['giveemail'];
- } elseif (!$_pv['fpassword'] = trim($_pv['fpassword'])) {
+ } elseif (!$_pv['fpassword'] = trim($_pv['fpassword'])) {
$error = $STRING['givepassword'];
- }
- if ($error) {
- list_items($userid, $error);
- return;
- }
- if (!isset($_pv['factive'])) $_pv['factive'] = 0;
-
- if (LOGIN_IS_EMAIL) {
- $login = $_pv['email'];
- } else {
- $login = $_pv['login'];
- }
+ }
+ if ($error) {
+ list_items($userid, $error);
+ return;
+ }
+ if (!isset($_pv['factive'])) $_pv['factive'] = 0;
+
+ if (EMAIL_IS_LOGIN) {
+ $login = $_pv['femail'];
+ } else {
+ $login = $_pv['flogin'];
+ }
if (!$userid) {
if (ENCRYPTPASS) $mpassword = md5($_pv['fpassword']);
else $mpassword = $_pv['fpassword'];
- $new_user_id = $q->nextid(TBL_AUTH_USER);
+ $new_user_id = $q->nextid(TBL_AUTH_USER);
$q->query('insert into '.TBL_AUTH_USER
- ." (user_id, first_name, last_name, login, email, password, active,
- created_by, created_date, last_modified_by, last_modified_date)
- values ($new_user_id, '{$_pv['ffirstname']}', '{$_pv['flastname']}',
- '$login', '{$_pv['femail']}', '$mpassword', {$_pv['factive']}, $u, $now,
- $u, $now)");
- 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)");
- }
+ ." (user_id, first_name, last_name, login, email, password, active,
+ created_by, created_date, last_modified_by, last_modified_date)
+ values ($new_user_id, '{$_pv['ffirstname']}', '{$_pv['flastname']}',
+ '$login', '{$_pv['femail']}', '$mpassword', {$_pv['factive']}, $u, $now,
+ $u, $now)");
+ 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)");
+ }
} else {
if (ENCRYPTPASS) {
$oldpass = $q->grab_field("select password from ".TBL_AUTH_USER
- ." where user_id = $userid");
+ ." where user_id = $userid");
if ($oldpass != $_pv['fpassword']) {
$pquery = "password = '".md5($_pv['fpassword'])."',";
} else {
@@ -75,42 +75,42 @@
} else {
$pquery = "password = '{$_pv['fpassword']}',";
}
- $q->query("update ".TBL_AUTH_USER." set first_name = '{$_pv['ffirstname']}',
- last_name = '{$_pv['flastname']}', email = '{$_pv['femail']}', $pquery
- active = {$_pv['factive']} where user_id = '$userid'");
-
- // Update group memberships
- // Get user's groups (without dropping the user group)
- $q->query('select ug.group_id from '.TBL_USER_GROUP.' ug left join '
- .TBL_AUTH_GROUP.' g using (group_id) '
- ." where user_id = $userid and group_name <> 'User'");
+ $q->query("update ".TBL_AUTH_USER." set first_name = '{$_pv['ffirstname']}',
+ last_name = '{$_pv['flastname']}',login = '$login', email = '{$_pv['femail']}', $pquery
+ active = {$_pv['factive']} where user_id = '$userid'");
+
+ // Update group memberships
+ // Get user's groups (without dropping the user group)
+ $q->query('select ug.group_id from '.TBL_USER_GROUP.' ug left join '
+ .TBL_AUTH_GROUP.' g using (group_id) '
+ ." where user_id = $userid and group_name <> 'User'");
while ($group_id = $q->grab_field()) {
- $user_groups[] = $group_id;
- }
- // Compute differences between old and new
- if (!is_array($user_groups)) {
- $user_groups = array();
- }
- if (!is_array($_pv['fusergroup'])) {
- $_pv['fusergroup'] = array();
- }
-
- $remove_from = array_diff($user_groups, $_pv['fusergroup']);
- $add_to = array_diff($_pv['fusergroup'], $user_groups);
-
- if (count($remove_from)) {
- foreach ($remove_from as $group) {
- $q->query('delete from '.TBL_USER_GROUP
- ." where user_id = $userid and group_id = $group");
- }
- }
- if (count($add_to)) {
- foreach ($add_to as $group) {
- $q->query("insert into ".TBL_USER_GROUP
- ." (user_id, group_id, created_by, created_date)
- values ('$userid' ,'$group', $u, $now)");
- }
- }
+ $user_groups[] = $group_id;
+ }
+ // Compute differences between old and new
+ if (!is_array($user_groups)) {
+ $user_groups = array();
+ }
+ if (!is_array($_pv['fusergroup'])) {
+ $_pv['fusergroup'] = array();
+ }
+
+ $remove_from = array_diff($user_groups, $_pv['fusergroup']);
+ $add_to = array_diff($_pv['fusergroup'], $user_groups);
+
+ if (count($remove_from)) {
+ foreach ($remove_from as $group) {
+ $q->query('delete from '.TBL_USER_GROUP
+ ." where user_id = $userid and group_id = $group");
+ }
+ }
+ if (count($add_to)) {
+ foreach ($add_to as $group) {
+ $q->query("insert into ".TBL_USER_GROUP
+ ." (user_id, group_id, created_by, created_date)
+ values ('$userid' ,'$group', $u, $now)");
+ }
+ }
}
header("Location: $me?");
}
@@ -121,12 +121,12 @@
if ($userid && !$error) {
$row = $q->grab("select * from ".TBL_AUTH_USER." where user_id = '$userid'");
-
- // Get user's groups
- $q->query('select group_id from '.TBL_USER_GROUP." where user_id = {$row['user_id']}");
+
+ // Get user's groups
+ $q->query('select group_id from '.TBL_USER_GROUP." where user_id = {$row['user_id']}");
while ($group_id = $q->grab_field()) {
- $user_groups[] = $group_id;
- }
+ $user_groups[] = $group_id;
+ }
$t->set_var(array(
'action' => $STRING['edit'],
@@ -138,7 +138,7 @@
'fpassword' => $row['password'],
'factive' => $row['active'] ? 'checked' : '',
'fusergroup' => build_select('group', $user_groups)
- ));
+ ));
} else {
$t->set_var(array(
'action' => $userid ? $STRING['edit'] : $STRING['addnew'],
@@ -149,18 +149,18 @@
'flastname' => stripslashes($_pv['lastname']),
'femail' => $_pv['email'],
'fpassword' => $_pv['password'] ? $_pv['password'] : genpassword(10),
- 'factive' => isset($_pv['active']) ? ($_pv['active'] ? 'checked' : '')
- : 'checked',
+ 'factive' => isset($_pv['active']) ? ($_pv['active'] ? 'checked' : '')
+ : 'checked',
'fusergroup' => build_select('group', $_pv['fusergroup'])
- ));
+ ));
+ }
+
+ // Show the login field only if login is not tied to email address
+ if (EMAIL_IS_LOGIN) {
+ $t->set_var('loginarea', '');
+ } else {
+ $t->parse('loginarea', 'loginentryarea', true);
}
-
- // Show the login field only if login is not tied to email address
- if (LOGIN_IS_EMAIL) {
- $t->set_var('loginarea', '');
- } else {
- $t->parse('loginarea', 'loginentryarea', true);
- }
}
function list_items($userid = 0, $error = '') {
@@ -182,9 +182,9 @@
'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
'records' => $nr));
- $q->query("select user_id, concat(first_name,' ',last_name) as fullname,
- email, login, created_date, active from ".TBL_AUTH_USER
- ." order by $order $sort limit $llimit, $selrange");
+ $q->query("select user_id, concat(first_name,' ',last_name) as fullname,
+ email, login, created_date, active from ".TBL_AUTH_USER
+ ." order by $order $sort limit $llimit, $selrange");
if (!$q->num_rows()) {
$t->set_var('rows',"<tr><td>{$STRING['nousers']}</td></tr>");
@@ -234,4 +234,4 @@
page_close();
-?>
+?>
\ No newline at end of file
|
|
From: Javier S. <js...@si...> - 2001-09-07 08:34:04
|
I have tested, and i works good for me ... no major bug find. I'm ok whith Patrick, table schema must be updated .. :-) Patrick Mairif wrote: >On Thu, 6 Sep 2001, Ben Curtis wrote: > >>So, since all is quiet, I guess testing went well for everybody and we are ready for release? :) >> > > >Sorry, I had no time to test sth., but I noticed that createdb.sql is >still not up to date! > |
|
From: Patrick M. <mai...@st...> - 2001-09-07 08:10:50
|
On Thu, 6 Sep 2001, Ben Curtis wrote: > So, since all is quiet, I guess testing went well for everybody and we are ready for release? :) Sorry, I had no time to test sth., but I noticed that createdb.sql is still not up to date! -- http://home.nikocity.de/mairif http://www.caravan-network.de |
|
From: Ben C. <php...@be...> - 2001-09-07 02:32:10
|
So, since all is quiet, I guess testing went well for everybody and we are ready for release? :) |
|
From: Ben C. <php...@be...> - 2001-09-06 03:32:34
|
Oops, I guess we can yank it, then. :)
On Wed, Sep 05, 2001 at 07:37:16PM +0200, Javier Sixto wrote:
> Benjamin Curtis wrote:
>
> >diff -u -r1.52 -r1.53
> >--- include.php 2001/09/05 13:26:13 1.52
> >+++ include.php 2001/09/05 17:19:20 1.53
> >@@ -141,6 +141,7 @@
> > function unauth($nobody = false) {
> > Auth::unauth($nobody);
> > $this->auth['group'] = '';
> >+ $this->auth['perm'] = '';
> >
> I haven't add 'perm' array because this is already done by
>
> Auth::unauth
>
> :-)
>
> >
> > $this->auth['db_fields'] = '';
> > }
> >}
> >
> >
> >_______________________________________________
> >phpbt-dev mailing list
> >php...@li...
> >https://lists.sourceforge.net/lists/listinfo/phpbt-dev
> >
>
>
>
>
> _______________________________________________
> phpbt-dev mailing list
> php...@li...
> https://lists.sourceforge.net/lists/listinfo/phpbt-dev
|
|
From: Javier S. <js...@si...> - 2001-09-05 17:37:27
|
Benjamin Curtis wrote:
>diff -u -r1.52 -r1.53
>--- include.php 2001/09/05 13:26:13 1.52
>+++ include.php 2001/09/05 17:19:20 1.53
>@@ -141,6 +141,7 @@
> function unauth($nobody = false) {
> Auth::unauth($nobody);
> $this->auth['group'] = '';
>+ $this->auth['perm'] = '';
>
I haven't add 'perm' array because this is already done by
Auth::unauth
:-)
>
> $this->auth['db_fields'] = '';
> }
> }
>
>
>_______________________________________________
>phpbt-dev mailing list
>php...@li...
>https://lists.sourceforge.net/lists/listinfo/phpbt-dev
>
|
|
From: Ben C. <php...@be...> - 2001-09-05 17:29:24
|
Yup, the only permissions are Admin and Editbug. Since all users belong to the user group and that group has Editbug permission, the only perm of interest is Admin. :) Groups are checked as well, as in the case of the select box for picking the owner of a component (on the admin side) which draws logins only from the Developer group. Of course, one day we will have more functionality and more perms to hande it. :) On Wed, Sep 05, 2001 at 04:33:44PM +0200, Javier Sixto wrote: > Hello, > > I was hardely testing perms/groups/auth system, and i just want to > anoted that actually perms.sql just create Admin and Editbug permissions. > But for admin and other perms test (bug.php) we use permission's name > like 'Administrator' or 'Manager' ... > So actualy there is only 2 perms level Admin and nothing. > I'm right o wrong ? :-) > > > > _______________________________________________ > phpbt-dev mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpbt-dev |
|
From: Benjamin C. <bc...@us...> - 2001-09-05 17:19:23
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv23431
Modified Files:
include.php
Log Message:
Might as well get rid of perm as well. :)
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- include.php 2001/09/05 13:26:13 1.52
+++ include.php 2001/09/05 17:19:20 1.53
@@ -141,6 +141,7 @@
function unauth($nobody = false) {
Auth::unauth($nobody);
$this->auth['group'] = '';
+ $this->auth['perm'] = '';
$this->auth['db_fields'] = '';
}
}
|
|
From: Javier S. <js...@si...> - 2001-09-05 14:35:37
|
Hello, I was hardely testing perms/groups/auth system, and i just want to anoted that actually perms.sql just create Admin and Editbug permissions. But for admin and other perms test (bug.php) we use permission's name like 'Administrator' or 'Manager' ... So actualy there is only 2 perms level Admin and nothing. I'm right o wrong ? :-) |
|
From: Javier S. <ja...@us...> - 2001-09-05 13:26:16
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv23677
Modified Files:
include.php
Log Message:
Clear 'group' auth var on logout.
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -r1.51 -r1.52
--- include.php 2001/09/05 13:16:55 1.51
+++ include.php 2001/09/05 13:26:13 1.52
@@ -140,6 +140,7 @@
function unauth($nobody = false) {
Auth::unauth($nobody);
+ $this->auth['group'] = '';
$this->auth['db_fields'] = '';
}
}
|
|
From: Javier S. <ja...@us...> - 2001-09-05 13:16:58
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv20834
Modified Files:
include.php
Log Message:
auth->check_auth() error whith non-array perms.
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- include.php 2001/09/03 20:16:34 1.50
+++ include.php 2001/09/05 13:16:55 1.51
@@ -162,7 +162,7 @@
}
}
} else {
- if (!$auth->auth[$auth_var][$req]) {
+ if (!$auth->auth[$auth_var][$reqs]) {
return false;
}
}
|
|
From: Michael B. <mb...@us...> - 2001-09-04 09:46:55
|
Update of /cvsroot/phpbt/phpbt/languages In directory usw-pr-cvs1:/tmp/cvs-serv6121 Modified Files: fr.php Log Message: added charset value Index: fr.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/fr.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- fr.php 2001/09/03 18:12:18 1.1 +++ fr.php 2001/09/04 09:46:50 1.2 @@ -24,6 +24,7 @@ // $Id$ $STRING = array( + 'lang_charset' => 'iso8859-1', 'nouser' => 'Cet utilisateur n\'existe pas', 'dupeofself' => 'Un bogue ne peut pas être doublon de lui-même', 'nobug' => 'Ce bogue n\'existe pas', |
|
From: Javier S. <ja...@us...> - 2001-09-04 07:55:18
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv11536 Modified Files: perms.sql Log Message: column match bug Index: perms.sql =================================================================== RCS file: /cvsroot/phpbt/phpbt/perms.sql,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- perms.sql 2001/09/04 03:45:40 1.6 +++ perms.sql 2001/09/04 07:55:14 1.7 @@ -16,11 +16,12 @@ insert into auth_perm (perm_id, perm_name) values (2, 'Editbug'); # Admins can do all the admin stuff and users can edit bugs -insert into group_perm (group_id, perm_id) values (1, 1, 0, 0); -insert into group_perm (group_id, perm_id) values (2, 2, 0, 0); +insert into group_perm (group_id, perm_id) values (1, 1); +insert into group_perm (group_id, perm_id) values (2, 2); + # And user_id 1 is the admin and a user -insert into user_group (user_id, group_id) values (1, 1, 0, 0); +insert into user_group (user_id, group_id) values (1,0); insert into user_group select user_id, 2, created_by, created_date from auth_user; # You can use these queries to convert the post 0.2.x / pre 0.3.0 schema |
|
From: Benjamin C. <bc...@us...> - 2001-09-04 03:46:17
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv7876 Modified Files: dbchanges.sql Log Message: Fixed a couple of bugs with the creation of the bug table Index: dbchanges.sql =================================================================== RCS file: /cvsroot/phpbt/phpbt/dbchanges.sql,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- dbchanges.sql 2001/08/30 20:44:40 1.11 +++ dbchanges.sql 2001/09/04 03:46:14 1.12 @@ -1,122 +1,132 @@ -CREATE TABLE `attachment` ( - `attachment_id` int(10) unsigned NOT NULL default '0', - `bug_id` int(10) unsigned NOT NULL default '0', - `file_name` char(255) NOT NULL default '', - `description` char(255) NOT NULL default '', - `file_size` bigint(20) unsigned NOT NULL default '0', - `mime_type` char(30) NOT NULL default '', - `created_by` int(10) unsigned NOT NULL default '0', - `created_date` bigint(20) unsigned NOT NULL default '0', - PRIMARY KEY (`attachment_id`) +drop table if exists attachment; +CREATE TABLE attachment ( + attachment_id int(10) unsigned NOT NULL default '0', + bug_id int(10) unsigned NOT NULL default '0', + file_name char(255) NOT NULL default '', + description char(255) NOT NULL default '', + file_size bigint(20) unsigned NOT NULL default '0', + mime_type char(30) NOT NULL default '', + created_by int(10) unsigned NOT NULL default '0', + created_date bigint(20) unsigned NOT NULL default '0', + PRIMARY KEY (attachment_id) ); insert into attachment select * from Attachment; -CREATE TABLE `bug` ( - `bug_id` int(10) unsigned NOT NULL default '0', - `bug_title` varchar(100) NOT NULL default '', - `bug_desc` text NOT NULL, - `bug_url` varchar(255) NOT NULL default '', - `severity_id` tinyint(3) unsigned NOT NULL default '0', - `priority` tinyint(3) unsigned NOT NULL default '0', - `status_id` tinyint(3) unsigned NOT NULL default '0', - `resolution_id` tinyint(3) unsigned NOT NULL default '0', - `assigned_to` 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', - `last_modified_by` int(10) unsigned NOT NULL default '0', - `last_modified_date` bigint(20) unsigned NOT NULL default '0', - `project_id` int(10) unsigned NOT NULL default '0', - `version_id` int(10) unsigned NOT NULL default '0', - `component_id` int(10) unsigned NOT NULL default '0', - `os_id` tinyint(3) unsigned NOT NULL default '0', - `browser_string` varchar(255) NOT NULL default '', - `close_date` bigint(20) unsigned NOT NULL default '0', - PRIMARY KEY (`bug_id`) +drop table if exists bug; +CREATE TABLE bug ( + bug_id int(10) unsigned NOT NULL default '0', + title varchar(100) NOT NULL default '', + description text NOT NULL, + url varchar(255) NOT NULL default '', + severity_id tinyint(3) unsigned NOT NULL default '0', + priority tinyint(3) unsigned NOT NULL default '0', + status_id tinyint(3) unsigned NOT NULL default '0', + resolution_id tinyint(3) unsigned NOT NULL default '0', + assigned_to 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', + last_modified_by int(10) unsigned NOT NULL default '0', + last_modified_date bigint(20) unsigned NOT NULL default '0', + project_id int(10) unsigned NOT NULL default '0', + version_id int(10) unsigned NOT NULL default '0', + component_id int(10) unsigned NOT NULL default '0', + os_id tinyint(3) unsigned NOT NULL default '0', + browser_string varchar(255) NOT NULL default '', + close_date bigint(20) unsigned NOT NULL default '0', + PRIMARY KEY (bug_id) ); insert into bug select *, 0 from Bug; -CREATE TABLE `bug_history` ( - `bug_id` int(10) unsigned NOT NULL default '0', - `changed_field` char(20) NOT NULL default '', - `old_value` char(255) NOT NULL default '', - `new_value` char(255) NOT NULL default '', - `created_by` int(10) unsigned NOT NULL default '0', - `created_date` bigint(20) unsigned NOT NULL default '0' +drop table if exists bug_history; +CREATE TABLE bug_history ( + bug_id int(10) unsigned NOT NULL default '0', + changed_field char(20) NOT NULL default '', + old_value char(255) NOT NULL default '', + new_value char(255) NOT NULL default '', + created_by int(10) unsigned NOT NULL default '0', + created_date bigint(20) unsigned NOT NULL default '0' ); insert into bug_history select * from BugHistory; -CREATE TABLE `comment` ( - `comment_id` int(10) unsigned NOT NULL default '0', - `bug_id` int(10) unsigned NOT NULL default '0', - `comment_text` text NOT NULL, - `created_by` int(10) unsigned NOT NULL default '0', - `created_date` bigint(20) unsigned NOT NULL default '0', - PRIMARY KEY (`comment_id`) +drop table if exists comment; +CREATE TABLE comment ( + comment_id int(10) unsigned NOT NULL default '0', + bug_id int(10) unsigned NOT NULL default '0', + comment_text text NOT NULL, + created_by int(10) unsigned NOT NULL default '0', + created_date bigint(20) unsigned NOT NULL default '0', + PRIMARY KEY (comment_id) ); insert into comment select * from Comment; -CREATE TABLE `component` ( - `component_id` int(10) unsigned NOT NULL default '0', - `project_id` int(10) unsigned NOT NULL default '0', - `component_name` varchar(30) NOT NULL default '', - `component_desc` text NOT NULL, - `owner` int(10) unsigned NOT NULL default '0', - `active` tinyint(1) NOT NULL default '1', - `created_by` int(10) unsigned NOT NULL default '0', - `created_date` bigint(20) unsigned NOT NULL default '0', - `last_modified_by` int(10) unsigned NOT NULL default '0', - `last_modified_date` bigint(20) unsigned NOT NULL default '0', - PRIMARY KEY (`component_id`) +drop table if exists component; +CREATE TABLE component ( + component_id int(10) unsigned NOT NULL default '0', + project_id int(10) unsigned NOT NULL default '0', + component_name varchar(30) NOT NULL default '', + component_desc text NOT NULL, + owner int(10) unsigned NOT NULL default '0', + active tinyint(1) NOT NULL default '1', + created_by int(10) unsigned NOT NULL default '0', + created_date bigint(20) unsigned NOT NULL default '0', + last_modified_by int(10) unsigned NOT NULL default '0', + last_modified_date bigint(20) unsigned NOT NULL default '0', + PRIMARY KEY (component_id) ); insert into component select * from Component; -CREATE TABLE `os` ( - `os_id` int(10) unsigned NOT NULL default '0', - `os_name` char(30) NOT NULL default '', - `sort_order` tinyint(3) unsigned NOT NULL default '0', - `regex` char(40) NOT NULL default '', - PRIMARY KEY (`os_id`) +drop table if exists os; +CREATE TABLE os ( + os_id int(10) unsigned NOT NULL default '0', + os_name char(30) NOT NULL default '', + sort_order tinyint(3) unsigned NOT NULL default '0', + regex char(40) NOT NULL default '', + PRIMARY KEY (os_id) ); insert into os select * from OS; -CREATE TABLE `project` ( - `project_id` int(10) unsigned NOT NULL default '0', - `project_name` varchar(30) NOT NULL default '', - `project_desc` text NOT NULL, - `active` tinyint(1) NOT NULL default '1', - `created_by` int(10) unsigned NOT NULL default '0', - `created_date` bigint(20) unsigned NOT NULL default '0', - `last_modified_by` int(10) unsigned NOT NULL default '0', - `last_modified_date` bigint(20) unsigned NOT NULL default '0', - PRIMARY KEY (`project_id`) +drop table if exists project; +CREATE TABLE project ( + project_id int(10) unsigned NOT NULL default '0', + project_name varchar(30) NOT NULL default '', + project_desc text NOT NULL, + active tinyint(1) NOT NULL default '1', + created_by int(10) unsigned NOT NULL default '0', + created_date bigint(20) unsigned NOT NULL default '0', + last_modified_by int(10) unsigned NOT NULL default '0', + last_modified_date bigint(20) unsigned NOT NULL default '0', + PRIMARY KEY (project_id) ); insert into project select *, CreatedBy, CreatedDate from Project; -CREATE TABLE `resolution` ( - `resolution_id` int(10) unsigned NOT NULL default '0', - `resolution_name` varchar(30) NOT NULL default '', - `resolution_desc` text NOT NULL, - `sort_order` tinyint(3) unsigned NOT NULL default '0', - PRIMARY KEY (`resolution_id`) +drop table if exists resolution; +CREATE TABLE resolution ( + resolution_id int(10) unsigned NOT NULL default '0', + resolution_name varchar(30) NOT NULL default '', + resolution_desc text NOT NULL, + sort_order tinyint(3) unsigned NOT NULL default '0', + PRIMARY KEY (resolution_id) ); insert into resolution select * from Resolution; -CREATE TABLE `saved_query` ( - `saved_query_id` int(10) unsigned NOT NULL auto_increment, - `user_id` int(10) unsigned NOT NULL default '0', - `saved_query_name` varchar(40) NOT NULL default '', - `saved_query_string` text NOT NULL, - PRIMARY KEY (`saved_query_id`,`user_id`) +drop table if exists saved_query; +CREATE TABLE saved_query ( + saved_query_id int(10) unsigned NOT NULL auto_increment, + user_id int(10) unsigned NOT NULL default '0', + saved_query_name varchar(40) NOT NULL default '', + saved_query_string text NOT NULL, + PRIMARY KEY (saved_query_id,user_id) ); insert into saved_query select * from SavedQuery; -CREATE TABLE `severity` ( - `severity_id` int(10) unsigned NOT NULL default '0', - `severity_name` varchar(30) NOT NULL default '', - `severity_desc` text NOT NULL, - `sort_order` tinyint(3) unsigned NOT NULL default '0', - `severity_color` varchar(10) NOT NULL default '#FFFFFF', - PRIMARY KEY (`severity_id`) +drop table if exists severity; +CREATE TABLE severity ( + severity_id int(10) unsigned NOT NULL default '0', + severity_name varchar(30) NOT NULL default '', + severity_desc text NOT NULL, + sort_order tinyint(3) unsigned NOT NULL default '0', + severity_color varchar(10) NOT NULL default '#FFFFFF', + PRIMARY KEY (severity_id) ); insert into severity select *, null from Severity; update severity set severity_color = '#dadada' where severity_id = '1'; @@ -127,42 +137,45 @@ update severity set severity_color = '#dab0b0' where severity_id = '6'; update severity set severity_color = '#daaaaa' where severity_id = '7'; -CREATE TABLE `status` ( - `status_id` int(10) unsigned NOT NULL default '0', - `status_name` varchar(30) NOT NULL default '', - `status_desc` text NOT NULL, - `sort_order` tinyint(3) unsigned NOT NULL default '0', - PRIMARY KEY (`status_id`) +drop table if exists status; +CREATE TABLE status ( + status_id int(10) unsigned NOT NULL default '0', + status_name varchar(30) NOT NULL default '', + status_desc text NOT NULL, + sort_order tinyint(3) unsigned NOT NULL default '0', + PRIMARY KEY (status_id) ); insert into status select * from Status; -CREATE TABLE `auth_user` ( - `user_id` int(10) unsigned NOT NULL default '0', - `login` char(40) NOT NULL default '', - `first_name` char(40) NOT NULL default '', - `last_name` char(40) NOT NULL default '', - `email` char(60) NOT NULL default '', - `password` char(40) NOT NULL default '', - `active` tinyint(3) unsigned NOT NULL default '1', - `bug_list_fields` char(255) NOT NULL default '', - `created_by` int(10) unsigned NOT NULL default '0', - `created_date` bigint(20) unsigned NOT NULL default '0', - `last_modified_by` int(10) unsigned NOT NULL default '0', - `last_modified_date` bigint(20) unsigned NOT NULL default '0', - PRIMARY KEY (`user_id`), +drop table if exists auth_user; +CREATE TABLE auth_user ( + user_id int(10) unsigned NOT NULL default '0', + login char(40) NOT NULL default '', + first_name char(40) NOT NULL default '', + last_name char(40) NOT NULL default '', + email char(60) NOT NULL default '', + password char(40) NOT NULL default '', + active tinyint(3) unsigned NOT NULL default '1', + bug_list_fields char(255) NOT NULL default '', + created_by int(10) unsigned NOT NULL default '0', + created_date bigint(20) unsigned NOT NULL default '0', + last_modified_by int(10) unsigned NOT NULL default '0', + last_modified_date bigint(20) unsigned NOT NULL default '0', + PRIMARY KEY (user_id), UNIQUE login (login) ); insert into auth_user select UserID, Email, FirstName, LastName, Email, Password, if (UserLevel > 0, 1, 0), '', 0, CreatedDate, 0, CreatedDate from User; -CREATE TABLE `version` ( - `version_id` int(10) unsigned NOT NULL default '0', - `project_id` int(10) unsigned NOT NULL default '0', - `version_name` char(10) NOT NULL default '', - `active` tinyint(1) NOT NULL default '1', - `created_by` int(10) unsigned NOT NULL default '0', - `created_date` bigint(20) unsigned NOT NULL default '0', - `last_modified_by` int(10) unsigned NOT NULL default '0', - `last_modified_date` bigint(20) unsigned NOT NULL default '0', - PRIMARY KEY (`version_id`) +drop table if exists version; +CREATE TABLE version ( + version_id int(10) unsigned NOT NULL default '0', + project_id int(10) unsigned NOT NULL default '0', + version_name char(10) NOT NULL default '', + active tinyint(1) NOT NULL default '1', + created_by int(10) unsigned NOT NULL default '0', + created_date bigint(20) unsigned NOT NULL default '0', + last_modified_by int(10) unsigned NOT NULL default '0', + last_modified_date bigint(20) unsigned NOT NULL default '0', + PRIMARY KEY (version_id) ); insert into version select *, CreatedBy, CreatedDate from Version; |
|
From: Benjamin C. <bc...@us...> - 2001-09-04 03:45:43
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv7802 Modified Files: perms.sql Log Message: Getting ready for release -- this will be folded into dbchanges.sql Index: perms.sql =================================================================== RCS file: /cvsroot/phpbt/phpbt/perms.sql,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- perms.sql 2001/09/03 20:22:42 1.5 +++ perms.sql 2001/09/04 03:45:40 1.6 @@ -21,11 +21,11 @@ # And user_id 1 is the admin and a user insert into user_group (user_id, group_id) values (1, 1, 0, 0); -insert into user_group (user_id, group_id) values (1, 2, 0, 0); +insert into user_group select user_id, 2, created_by, created_date from auth_user; # You can use these queries to convert the post 0.2.x / pre 0.3.0 schema -alter table user rename auth_user; -alter table auth_user change user_level active tinyint unsigned not null; -alter table auth_user add login char(40) not null after user_id; -update auth_user set active = 1 where active > 0; -update auth_user set login = email; +#alter table user rename auth_user; +#alter table auth_user change user_level active tinyint unsigned not null; +#alter table auth_user add login char(40) not null after user_id; +#update auth_user set active = 1 where active > 0; +#update auth_user set login = email; |
|
From: Benjamin C. <bc...@us...> - 2001-09-03 20:43:12
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv12866
Modified Files:
query.php
Log Message:
Indenting is fun
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- query.php 2001/09/01 15:44:20 1.26
+++ query.php 2001/09/03 20:43:09 1.27
@@ -20,6 +20,7 @@
// along with phpBugTracker; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// ------------------------------------------------------------------------
+// $Id$
include 'include.php';
@@ -169,14 +170,14 @@
if ($savedqueryname) {
$savedquerystring = ereg_replace('&savedqueryname=.*(&?)', '\\1', $GLOBALS['QUERY_STRING']);
$q->query("insert into ".TBL_SAVED_QUERY." (user_id, saved_query_name, saved_query_string)"
- ." values ($u, '$savedqueryname', '$savedquerystring')");
+ ." values ($u, '$savedqueryname', '$savedquerystring')");
}
if (!$order) { $order = 'bug_id'; $sort = 'asc'; }
if (!$querystring or $op) build_query($assignedto, $reportedby, $open);
$nr = $q->grab_field("select count(*) from ".TBL_BUG." bug"
- ." left join ".TBL_AUTH_USER." owner on bug.assigned_to = owner.user_id"
- ." left join ".TBL_AUTH_USER." reporter on bug.created_by = reporter.user_id "
- .($querystring != '' ? "where $querystring": ''));
+ ." left join ".TBL_AUTH_USER." owner on bug.assigned_to = owner.user_id"
+ ." left join ".TBL_AUTH_USER." reporter on bug.created_by = reporter.user_id "
+ .($querystring != '' ? "where $querystring": ''));
list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
"order=$order&sort=$sort");
@@ -189,20 +190,20 @@
'project' => build_select('project'),
'TITLE' => $TITLE['buglist']));
- $q->query("select bug.*, reporter.login as reporter, owner.login as owner, lastmodifier.login as lastmodifier,"
- ." project_name, severity_name, status_name, os_name, version_name, component_name, resolution_name,"
- ." severity_color"
- ." from ".TBL_BUG." bug left join ".TBL_RESOLUTION." resolution using (resolution_id),"
- . TBL_SEVERITY." severity, ".TBL_STATUS." status, ".TBL_OS." os, ".TBL_VERSION." version, "
- . TBL_COMPONENT." component, ".TBL_PROJECT." project"
- ." left join ".TBL_AUTH_USER." owner on bug.assigned_to = owner.user_id"
- ." left join ".TBL_AUTH_USER." reporter on bug.created_by = reporter.user_id"
- ." left join ".TBL_AUTH_USER." lastmodifier on bug.last_modified_by = lastmodifier.user_id"
- ." where bug.severity_id = severity.severity_id and bug.status_id = status.status_id"
- ." and bug.os_id = os.os_id and bug.version_id = version.version_id"
- ." and bug.component_id = component.component_id and bug.project_id = project.project_id "
- . ($querystring != '' ? "and $querystring " : '')
- ." order by $order $sort limit $llimit, $selrange");
+ $q->query("select bug.*, reporter.login as reporter, owner.login as owner,
+ lastmodifier.login as lastmodifier, project_name, severity_name,
+ status_name, os_name, version_name, component_name, resolution_name, severity_color"
+ ." from ".TBL_BUG." bug left join ".TBL_RESOLUTION." resolution using (resolution_id),"
+ . TBL_SEVERITY." severity, ".TBL_STATUS." status, ".TBL_OS." os, ".TBL_VERSION." version, "
+ . TBL_COMPONENT." component, ".TBL_PROJECT." project"
+ ." left join ".TBL_AUTH_USER." owner on bug.assigned_to = owner.user_id"
+ ." left join ".TBL_AUTH_USER." reporter on bug.created_by = reporter.user_id"
+ ." left join ".TBL_AUTH_USER." lastmodifier on bug.last_modified_by = lastmodifier.user_id"
+ ." where bug.severity_id = severity.severity_id and bug.status_id = status.status_id"
+ ." and bug.os_id = os.os_id and bug.version_id = version.version_id"
+ ." and bug.component_id = component.component_id and bug.project_id = project.project_id "
+ . ($querystring != '' ? "and $querystring " : '')
+ ." order by $order $sort limit $llimit, $selrange");
$headers = array(
'bug_id' => 'bug_id',
|
|
From: Benjamin C. <bc...@us...> - 2001-09-03 20:34:57
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv11083/admin
Modified Files:
severity.php
Log Message:
Cleanup
Index: severity.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/severity.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- severity.php 2001/09/03 17:20:16 1.6
+++ severity.php 2001/09/03 20:34:53 1.7
@@ -44,7 +44,7 @@
}
function show_form($severityid = 0, $error = '') {
- global $q, $me, $t, $fname, $fdescription, $fsortorder, $STRING;
+ global $q, $me, $t, $_pv, $STRING;
if ($severityid && !$error) {
$row = $q->grab("select * from ".TBL_SEVERITY." where severity_id = '$severityid'");
@@ -60,10 +60,12 @@
'action' => $severityid ? $STRING['edit'] : $STRING['addnew'],
'error' => $error,
'fseverityid' => $severityid,
- 'fname' => $fname,
- 'fdescription' => $fdescription,
- 'fsortorder' => $fsortorder,
- 'fcolor' => $fcolor));
+ 'fname' => $_pv['fname'] ? stripslashes($_pv['fname']) : '',
+ 'fdescription' => $_pv['fdescription'] ?
+ stripslashes($_pv['fdescription']) : '',
+ 'fsortorder' => $_pv['fsortorder'] ? $_pv['fsortorder'] : '',
+ 'fcolor' => $_pv['fcolor'] ? $_pv['fcolor'] : ''
+ ));
}
}
@@ -104,7 +106,8 @@
while ($row = $q->grab()) {
$t->set_var(array(
- 'bgcolor' => $row['severity_color'],
+ 'bgcolor' => USE_SEVERITY_COLOR ? $row['severity_color'] :
+ ((++$i % 2 == 0) ? '#dddddd' : '#ffffff'),
'severityid' => $row['severity_id'],
'name' => $row['severity_name'],
'description' => $row['severity_desc'],
|
|
From: Benjamin C. <bc...@us...> - 2001-09-03 20:28:47
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv9607/admin
Modified Files:
user.php
Log Message:
Group assignment is working.
Code cleanup.
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- user.php 2001/09/03 17:32:47 1.22
+++ user.php 2001/09/03 20:28:43 1.23
@@ -26,46 +26,107 @@
include INCLUDE_PATH.'include.php';
function do_form($userid = 0) {
- global $q, $me, $flogin, $ffirstname, $flastname, $femail, $fpassword, $fusergroup, $STRING, $now;
+ global $q, $me, $_pv, $STRING, $now, $u;
// Validation
- if (!valid_email($femail))
+ if (!LOGIN_IS_EMAIL && !$_pv['flogin'] = trim($_pv['flogin'])) {
+ $error = $STRING['givelogin'];
+ } elseif (!valid_email($_pv['femail'])) {
$error = $STRING['giveemail'];
- elseif (!$fpassword = trim($fpassword))
+ } elseif (!$_pv['fpassword'] = trim($_pv['fpassword'])) {
$error = $STRING['givepassword'];
- if ($error) { list_items($userid, $error); return; }
+ }
+ if ($error) {
+ list_items($userid, $error);
+ return;
+ }
+ if (!isset($_pv['factive'])) $_pv['factive'] = 0;
+
+ if (LOGIN_IS_EMAIL) {
+ $login = $_pv['email'];
+ } else {
+ $login = $_pv['login'];
+ }
if (!$userid) {
- if (ENCRYPTPASS) $mpassword = md5($fpassword);
- else $mpassword = $fpassword;
- $new_user_id = $q->nextid(TBL_AUTH_USER);
- $q->query("insert into ".TBL_AUTH_USER." (user_id, login, first_name, last_name, email, password, created_date) values ($new_user_id, '$flogin','$ffirstname', '$flastname', '$femail', '$mpassword', $now)");
- $q->query("insert into ".TBL_USER_GROUP." (user_id, group_id) values ('$new_user_id' ,'$fusergroup')");
+ if (ENCRYPTPASS) $mpassword = md5($_pv['fpassword']);
+ else $mpassword = $_pv['fpassword'];
+ $new_user_id = $q->nextid(TBL_AUTH_USER);
+ $q->query('insert into '.TBL_AUTH_USER
+ ." (user_id, first_name, last_name, login, email, password, active,
+ created_by, created_date, last_modified_by, last_modified_date)
+ values ($new_user_id, '{$_pv['ffirstname']}', '{$_pv['flastname']}',
+ '$login', '{$_pv['femail']}', '$mpassword', {$_pv['factive']}, $u, $now,
+ $u, $now)");
+ 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)");
+ }
} else {
if (ENCRYPTPASS) {
- $oldpass = $q->grab_field("select password from ".TBL_AUTH_USER." where user_id = $userid");
- if ($oldpass != $fpassword) {
- $pquery = "password = '".md5($fpassword)."',";
+ $oldpass = $q->grab_field("select password from ".TBL_AUTH_USER
+ ." where user_id = $userid");
+ if ($oldpass != $_pv['fpassword']) {
+ $pquery = "password = '".md5($_pv['fpassword'])."',";
} else {
$pquery = '';
}
} else {
- $pquery = "password = '$fpassword',";
+ $pquery = "password = '{$_pv['fpassword']}',";
}
- $q->query("update ".TBL_AUTH_USER." set first_name = '$ffirstname', last_name = '$flastname', email = '$femail' where user_id = '$userid'");
- $q->query("update ".TBL_USER_GROUP." set group_id = '$fusergroup' where user_id = '$userid'");
+ $q->query("update ".TBL_AUTH_USER." set first_name = '{$_pv['ffirstname']}',
+ last_name = '{$_pv['flastname']}', email = '{$_pv['femail']}', $pquery
+ active = {$_pv['factive']} where user_id = '$userid'");
+
+ // Update group memberships
+ // Get user's groups (without dropping the user group)
+ $q->query('select ug.group_id from '.TBL_USER_GROUP.' ug left join '
+ .TBL_AUTH_GROUP.' g using (group_id) '
+ ." where user_id = $userid and group_name <> 'User'");
+ while ($group_id = $q->grab_field()) {
+ $user_groups[] = $group_id;
+ }
+ // Compute differences between old and new
+ if (!is_array($user_groups)) {
+ $user_groups = array();
+ }
+ if (!is_array($_pv['fusergroup'])) {
+ $_pv['fusergroup'] = array();
+ }
+
+ $remove_from = array_diff($user_groups, $_pv['fusergroup']);
+ $add_to = array_diff($_pv['fusergroup'], $user_groups);
+
+ if (count($remove_from)) {
+ foreach ($remove_from as $group) {
+ $q->query('delete from '.TBL_USER_GROUP
+ ." where user_id = $userid and group_id = $group");
+ }
+ }
+ if (count($add_to)) {
+ foreach ($add_to as $group) {
+ $q->query("insert into ".TBL_USER_GROUP
+ ." (user_id, group_id, created_by, created_date)
+ values ('$userid' ,'$group', $u, $now)");
+ }
+ }
}
header("Location: $me?");
}
function show_form($userid = 0, $error = '') {
- global $q, $me, $t, $login,$firstname, $lastname, $email, $password, $usertype, $STRING;
+ global $q, $me, $t, $_pv, $STRING;
if ($userid && !$error) {
$row = $q->grab("select * from ".TBL_AUTH_USER." where user_id = '$userid'");
- //Get User's group id
- $user_group_id=$q->grab_field('select group_id from '.TBL_USER_GROUP.' where user_id='.$row['user_id'].' limit 1');
+
+ // Get user's groups
+ $q->query('select group_id from '.TBL_USER_GROUP." where user_id = {$row['user_id']}");
+ while ($group_id = $q->grab_field()) {
+ $user_groups[] = $group_id;
+ }
$t->set_var(array(
'action' => $STRING['edit'],
@@ -75,33 +136,44 @@
'flastname' => stripslashes($row['last_name']),
'femail' => $row['email'],
'fpassword' => $row['password'],
- 'fusergroup' => build_select('group',$user_group_id),
- 'createddate' => $row['created_date']));
+ 'factive' => $row['active'] ? 'checked' : '',
+ 'fusergroup' => build_select('group', $user_groups)
+ ));
} else {
$t->set_var(array(
'action' => $userid ? $STRING['edit'] : $STRING['addnew'],
'error' => $error,
- 'fuserid' => $userid,
- 'flogin' => $login,
- 'ffirstname' => stripslashes($firstname),
- 'flastname' => stripslashes($lastname),
- 'femail' => $email,
- 'fpassword' => $password ? $password : genpassword(10),
- 'fusergroup' => build_select('group'),
- 'createddate' => $createddate));
+ 'fuserid' => $_pv['userid'],
+ 'flogin' => $_pv['login'],
+ 'ffirstname' => stripslashes($_pv['firstname']),
+ 'flastname' => stripslashes($_pv['lastname']),
+ 'femail' => $_pv['email'],
+ 'fpassword' => $_pv['password'] ? $_pv['password'] : genpassword(10),
+ 'factive' => isset($_pv['active']) ? ($_pv['active'] ? 'checked' : '')
+ : 'checked',
+ 'fusergroup' => build_select('group', $_pv['fusergroup'])
+ ));
}
+
+ // Show the login field only if login is not tied to email address
+ if (LOGIN_IS_EMAIL) {
+ $t->set_var('loginarea', '');
+ } else {
+ $t->parse('loginarea', 'loginentryarea', true);
+ }
}
function list_items($userid = 0, $error = '') {
- global $me, $q, $t, $selrange, $order, $sort, $select, $STRING, $TITLE, $page;
+ global $me, $q, $t, $selrange, $order, $sort, $STRING, $TITLE, $page;
- $t->set_file('content','userlist.html');
- $t->set_block('content','row','rows');
+ $t->set_file('content', 'userlist.html');
+ $t->set_block('content', 'row', 'rows');
+ $t->set_block('content', 'loginentryarea', 'loginarea');
- if (!$order) { $order = '1'; $sort = 'asc'; }
+ if (!$order) { $order = 'login'; $sort = 'asc'; }
$nr = $q->grab_field("select count(*) from ".TBL_AUTH_USER);
- list($selrange, $llimit, $npages, $pages) = multipages($nr,$page,
+ list($selrange, $llimit, $npages, $pages) = multipages($nr, $page,
"order=$order&sort=$sort");
$t->set_var(array(
@@ -110,9 +182,9 @@
'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
'records' => $nr));
- $q->query("select user_id,login, concat(first_name,' ',last_name) as fullname, email,
- created_date from ".TBL_AUTH_USER." order by $order $sort
- limit $llimit, $selrange");
+ $q->query("select user_id, concat(first_name,' ',last_name) as fullname,
+ email, login, created_date, active from ".TBL_AUTH_USER
+ ." order by $order $sort limit $llimit, $selrange");
if (!$q->num_rows()) {
$t->set_var('rows',"<tr><td>{$STRING['nousers']}</td></tr>");
@@ -122,8 +194,10 @@
$headers = array(
'userid' => 'user_id',
'name' => 'last_name',
- 'login' => 'email',
+ 'login' => 'login',
+ 'email' => 'email',
'password' => 'password',
+ 'active' => 'active',
'date' => 'created_date');
sorting_headers($me, $headers, $order, $sort);
@@ -135,13 +209,14 @@
'login' => $row['login'],
'name' => stripslashes($row['fullname']),
'email' => $row['email'],
+ 'active' => $row['active'] ? 'Yes' : 'No',
//'usergroup' => $q->grab_field('select group_name from '.TBL_AUTH_GROUP.' ag, '.TBL_USER_GROUP.' ug where user_id='.$row['user_id'].' and ag.group_id = ug.group_id limit 1'),
'date' => date(DATEFORMAT,$row['created_date'])));
$t->parse('rows','row',true);
}
show_form($userid, $error);
- $t->set_var('TITLE',$TITLE['user']);
+ $t->set_var('TITLE', $TITLE['user']);
}
$t->set_file('wrap','wrap.html');
@@ -155,8 +230,8 @@
do_form($id);
} else list_items();
-$t->pparse('main',array('content','wrap','main'));
+$t->pparse('main',array('content', 'wrap', 'main'));
page_close();
-?>
\ No newline at end of file
+?>
|
|
From: Benjamin C. <bc...@us...> - 2001-09-03 20:27:31
|
Update of /cvsroot/phpbt/phpbt/admin/templates/default
In directory usw-pr-cvs1:/tmp/cvs-serv9379/admin/templates/default
Modified Files:
userlist.html
Log Message:
admin/user.php
Index: userlist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/templates/default/userlist.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- userlist.html 2001/09/03 17:11:12 1.2
+++ userlist.html 2001/09/03 20:27:28 1.3
@@ -1,75 +1,84 @@
<!--<a href="{me}?op=add">Add a new user</a>-->
<br>
<table border="0">
- <tr>
- <td valign="top">
- <b> User List</b>
- <hr size="1">
- <table border="0">
- <tr bgcolor="#eeeeee">
- <th><a href="{loginurl}">Login</a></th>
- <th><a href="{nameurl}">Name</a></th>
- <th><a href="{dateurl}">Created</a></th>
- </tr>
- <!-- BEGIN row -->
- <tr bgcolor="{bgcolor}">
- <td><a href="{me}?op=edit&id={userid}">{login}</a></td>
- <td align="center">{name}</td>
- <td align="center">{date}</td>
- </tr>
- <!-- END row -->
- <tr>
- <td colspan="4" align="center">
- <br>
- {first} to {last} of {records}
- <br>
- {pages}
- </table>
- </td>
- <td valign="top">
- <div align="right"><b>{action} user </b></div>
- <hr size="1">
- <form action="user.php" method="post">
- <input type="hidden" name="id" value="{fuserid}">
- <table border='0'>
+ <tr>
+ <td valign="top">
+ <b> User List</b>
+ <hr size="1">
+ <table border="0">
+ <tr>
+ <th bgcolor="{logincolor}"><a href="{loginurl}">Login</a></th>
+ <th bgcolor="{namecolor}"><a href="{nameurl}">Name</a></th>
+ <th bgcolor="{datecolor}"><a href="{dateurl}">Created</a></th>
+ <th bgcolor="{activecolor}"><a href="{activeurl}">Active</a></th>
+ </tr>
+ <!-- BEGIN row -->
+ <tr bgcolor="{bgcolor}">
+ <td><a href="{me}?op=edit&id={userid}">{login}</a></td>
+ <td align="center">{name}</td>
+ <td align="center">{date}</td>
+ <td align="center">{active}</td>
+ </tr>
+ <!-- END row -->
+ <tr>
+ <td colspan="4" align="center">
+ <br>
+ {first} to {last} of {records}
+ <br>
+ {pages}
+ </td>
+ </tr>
+ </table>
+ </td>
+ <td valign="top">
+ <div align="right"><b>{action} user </b></div>
+ <hr size="1">
+ <form action="user.php" method="post">
+ <input type="hidden" name="id" value="{fuserid}">
+ <table border='0'>
+ <tr>
+ <td colspan="2" align="center" valign="top">
+ <font color="#ff0000">{error}</font>
+ </td>
+ </tr>
+ <!-- BEGIN loginentryarea -->
+ <tr>
+ <td align="right" valign="top">Login:</td>
+ <td><input type="text" size="20" maxlength="40" name="flogin" value="{flogin}"></td>
+ </tr>
+ <!-- END loginentryarea -->
+ <tr>
+ <td align="right" valign="top">Email:</td>
+ <td><input type="text" size="20" maxlength="40" name="femail" value="{femail}"></td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">FirstName:</td>
+ <td><input type="text" size="20" maxlength="40" name="ffirstname" value="{ffirstname}"></td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">LastName:</td>
+ <td><input type="text" size="20" maxlength="40" name="flastname" value="{flastname}"></td>
+ </tr>
+ <tr>
+ <td align="right" valign="top">Password:</td>
+ <td><input type="text" size="20" maxlength="40" name="fpassword" value="{fpassword}"></td>
+ </tr>
<tr>
- <td colspan="2" align="center" valign="top">
- <font color="#ff0000">{error}</font>
- </td>
- </tr>
- <tr>
- <td align="right" valign="top">Login:</td>
- <td><input type="text" size="20" maxlength="40" name="flogin" value="{flogin}"></td>
- </tr>
- <tr>
- <td align="right" valign="top">FirstName:</td>
- <td><input type="text" size="20" maxlength="40" name="ffirstname" value="{ffirstname}"></td>
- </tr>
- <tr>
- <td align="right" valign="top">LastName:</td>
- <td><input type="text" size="20" maxlength="40" name="flastname" value="{flastname}"></td>
- </tr>
- <tr>
- <td align="right" valign="top">Email:</td>
- <td><input type="text" size="20" maxlength="40" name="femail" value="{femail}"></td>
- </tr>
- <tr>
- <td align="right" valign="top">Password:</td>
- <td><input type="text" size="20" maxlength="40" name="fpassword" value="{fpassword}"></td>
- </tr>
-
- <tr>
<td align="right" valign="top">User Group:</td>
<td>
- <select name="fusergroup">
+ <select name="fusergroup[]" size="3" multiple>
{fusergroup}
</select>
</td>
</tr>
- </table>
- <div align="right">
- <input type='submit' name='submit' value='Submit'>
- </div>
- </form>
- </td>
-</table>
\ No newline at end of file
+ <tr>
+ <td align="right" valign="top">Active:</td>
+ <td><input type="checkbox" name="factive" value="1" {factive}></td>
+ </tr>
+ </table>
+ <div align="right">
+ <input type='submit' name='submit' value='Submit'>
+ </div>
+ </form>
+ </td>
+</table>
|
|
From: Benjamin C. <bc...@us...> - 2001-09-03 20:22:45
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv8188 Modified Files: perms.sql Log Message: Added created_by and created_date fields Index: perms.sql =================================================================== RCS file: /cvsroot/phpbt/phpbt/perms.sql,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- perms.sql 2001/09/03 15:07:54 1.4 +++ perms.sql 2001/09/03 20:22:42 1.5 @@ -1,8 +1,8 @@ create table auth_group (group_id int unsigned not null, group_name varchar(80) not null, created_by int unsigned not null, created_date bigint unsigned not null, last_modified_by int unsigned not null, last_modified_date bigint unsigned not null, primary key (group_id)); create table auth_perm (perm_id int unsigned not null, perm_name varchar(80) not null, created_by int unsigned not null, created_date bigint unsigned not null, last_modified_by int unsigned not null, last_modified_date bigint unsigned not null, primary key (perm_id)); -create table user_group (user_id int unsigned not null, group_id int unsigned not null, primary key (user_id, group_id), key (group_id)); +create table user_group (user_id int unsigned not null, group_id int unsigned not null, created_by int unsigned not null, created_date bigint unsigned not null, primary key (user_id, group_id), key (group_id)); create table user_perm (user_id int unsigned not null, perm_id int unsigned not null, primary key (user_id, perm_id), key (perm_id)); -create table group_perm (group_id int unsigned not null, perm_id int unsigned not null, primary key (group_id, perm_id), key (perm_id)); +create table group_perm (group_id int unsigned not null, perm_id int unsigned not null, created_by int unsigned not null, created_date bigint unsigned not null, primary key (group_id, perm_id), key (perm_id)); create table bug_group (bug_id int unsigned not null, group_id int unsigned not null, primary key (bug_id, group_id), key (group_id)); create table project_group (project_id int unsigned not null, group_id int unsigned not null, primary key (project_id, group_id), key (group_id)); @@ -16,11 +16,12 @@ insert into auth_perm (perm_id, perm_name) values (2, 'Editbug'); # Admins can do all the admin stuff and users can edit bugs -insert into group_perm (group_id, perm_id) values (1, 1); -insert into group_perm (group_id, perm_id) values (2, 2); +insert into group_perm (group_id, perm_id) values (1, 1, 0, 0); +insert into group_perm (group_id, perm_id) values (2, 2, 0, 0); -# And user_id 1 is the admin -insert into user_group (user_id, group_id) values (1, 1); +# And user_id 1 is the admin and a user +insert into user_group (user_id, group_id) values (1, 1, 0, 0); +insert into user_group (user_id, group_id) values (1, 2, 0, 0); # You can use these queries to convert the post 0.2.x / pre 0.3.0 schema alter table user rename auth_user; |
|
From: Benjamin C. <bc...@us...> - 2001-09-03 20:16:36
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv6688
Modified Files:
include.php
Log Message:
Query indenting, changed the group build_select to not include the user group (everyone has to be a user), and changed the owner build_select to only include developers
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- include.php 2001/09/03 17:36:07 1.49
+++ include.php 2001/09/03 20:16:34 1.50
@@ -126,9 +126,9 @@
// Grab group assignments and permissions based on groups
$q->query("select 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']}");
+ ." 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()) {
$this->auth['perm'][$perm] = true;
$this->auth['group'][$group] = true;
@@ -151,7 +151,7 @@
global $auth;
// Administrators always pass
- if ($auth->auth[$auth_var]['admin']) {
+ if ($auth->auth[$auth_var]['Admin']) {
return true;
}
@@ -200,13 +200,13 @@
if ($u && $u != 'nobody') {
list($owner_open, $owner_closed) =
$q->grab("select sum(if(status_name in ('Unconfirmed','New','Assigned','Reopened'),1,0)),"
- ." sum(if(status_name not in ('Unconfirmed','New','Assigned','Reopened'),1,0))"
- ." from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id)"
- ." where assigned_to = $u");
+ ." sum(if(status_name not in ('Unconfirmed','New','Assigned','Reopened'),1,0))"
+ ." from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id)"
+ ." where assigned_to = $u");
list($reporter_open, $reporter_closed) =
- $q->grab("select sum(if(status_name in ('Unconfirmed','New','Assigned','Reopened'),1,0)),"
- ." sum(if(status_name not in ('Unconfirmed','New','Assigned','Reopened'),1,0))"
- ." from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id) where created_by = $u");
+ $q->grab("select sum(if(status_name in ('Unconfirmed','New','Assigned','Reopened'),1,0)),"
+ ." sum(if(status_name not in ('Unconfirmed','New','Assigned','Reopened'),1,0))"
+ ." from ".TBL_BUG." b left join ".TBL_STATUS." s using(status_id) where created_by = $u");
$this->set_var(array(
'loggedinas' => $auth->auth['uname'],
'liblock' => '',
@@ -281,7 +281,7 @@
$text = '';
$querystart = "select {$box}_id, {$box}_name from $cfgDatabase[$box]";
$queries = array(
- 'group' => $querystart.' order by group_name',
+ 'group' => $querystart.' where group_name <> "User" order by group_name',
'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',
@@ -294,7 +294,7 @@
case 'group' :
$q->query($queries[$box]);
while ($row = $q->grab()) {
- if ($value == $row[$box.'_id'] and $value != '') $sel = ' selected';
+ if (count($value) && in_array($row[$box.'_id'], $value)) $sel = ' selected';
else $sel = '';
$text .= '<option value="'.
$row[$box.'_id']."\"$sel>".$row[$box.'_name'].'</option>';
@@ -326,7 +326,7 @@
}
break;
case 'owner' :
- $q->query("select user_id, login from ".TBL_AUTH_USER." where active > 0 order by login");
+ $q->query("select u.user_id, login from ".TBL_AUTH_USER." u, ".TBL_USER_GROUP." ug, ".TBL_AUTH_GROUP." g where u.active > 0 and u.user_id = ug.user_id and ug.group_id = g.group_id and group_name = 'Developer' order by login");
while ($row = $q->grab()) {
if ($value == $row['user_id']) $sel = ' selected';
else $sel = '';
@@ -502,4 +502,4 @@
}
}
-?>
\ No newline at end of file
+?>
|
|
From: Benjamin C. <bc...@us...> - 2001-09-03 18:12:21
|
Update of /cvsroot/phpbt/phpbt/languages In directory usw-pr-cvs1:/tmp/cvs-serv4917 Added Files: fr.php Log Message: --- NEW FILE: fr.php --- <?php // fr.php - French strings and titles // Translation by Pierre Wargnier // ------------------------------------------------------------------------ // Copyright (c) 2001 The phpBugTracker Group // ------------------------------------------------------------------------ // This file is part of phpBugTracker // // phpBugTracker is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // phpBugTracker is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with phpBugTracker; if not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // ------------------------------------------------------------------------ // $Id: fr.php,v 1.1 2001/09/03 18:12:18 bcurtis Exp $ $STRING = array( 'nouser' => 'Cet utilisateur n\'existe pas', 'dupeofself' => 'Un bogue ne peut pas être doublon de lui-même', 'nobug' => 'Ce bogue n\'existe pas', 'givesummary' => 'Veuillez saisir un résumé', 'givedesc' => 'Veuillez saisir une description', 'noprojects' => 'Pas de projet trouvé', 'totalbugs' => 'Total Bogues', 'giveemail' => 'Veuillez saisir une adresse électronique valide', 'givelogin' => 'Please enter a login', 'loginused' => 'Cet identifiant de connection est déjà utilisé', 'newacctsubject' => 'Identifiant de connection phpBugTracker', 'newacctmessage' => "Votre mot de passe phpBugTracker est %s", 'nobugs' => 'Pas de bogue trouvé', 'givename' => 'Veuillez saisir un nom', 'edit' => 'Editer', 'addnew' => 'Nouveau', 'nooses' => 'Pas d\'environement trouvé', 'giveinitversion' => 'Veuillez saisir une version initiale pour ce projet', 'giveversion' => 'Veuillez saisir une version', 'noversions' => 'Pas de version trouvée', 'nocomponents' => 'Pas de composant trouvé', 'nostatses' => 'Pas de statut trouvé', 'givepassword' => 'Veuillez saisir un mot de passe', 'nousers' => 'Pas d\'utilisateur trouvé', 'bugbadperm' => 'Vous ne pouvez pas modifier ce bogue', 'bugbadnum' => 'Ce bogue n\'existe pas', 'datecollision' => 'Ce bogue a été modifié depuis votre dernière lecture. Il a été rechargé avec ses dernières modifications.', 'passwordmatch' => 'Les mots de passe ne correspondent pas -- veuillez re-essayer', 'nobughistory' => 'Il n\'y a pas d\'historique pour ce bogue', 'logintomodify' => 'Vous devez être connecté pour modifier ce bogue', 'dupe_attachment' => 'Ce fichier attaché existe déjà pour ce bogue', 'give_attachment' => 'Veuillez spécifier un fichier à envoyer', 'no_attachment_save_path' => 'Imossible de savoir ou stocker le fichier!', 'attachment_path_not_writeable' => 'Impossible de créer un fichier dans le répertoire de sauvegarde', 'attachment_move_error' => 'Une erreur est survenue lors du déplacement du fichier envoyé', 'bad_attachment' => 'Ce fichier attaché n\'existe pas', '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' ); // Page titles $TITLE = array( 'enterbug' => 'Saisir un bogue', 'editbug' => 'Editer un bogue', 'newaccount' => 'Créer un nouveau compte', 'bugquery' => 'Recherche de bogues', 'buglist' => 'Liste de bogues', 'addcomponent' => 'Ajouter un composant', 'editcomponent' => 'Editer un composant', 'addproject' => 'Ajouter un projet', 'editproject' => 'Editer un projet', 'addversion' => 'Ajouter une version', 'editversion' => 'Editer une version', 'project' => 'Projets', 'os' => 'Environements', 'resolution' => 'Resolutions', 'status' => 'Statuts', 'user' => 'Utilisateurs', 'home' => 'Sommaire', 'reporting' => 'Tableaux de bord', 'severity' => 'Criticité' ); ?> |