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-08-29 03:45:26
|
Update of /cvsroot/phpbt/phpbt/languages In directory usw-pr-cvs1:/tmp/cvs-serv27386 Added Files: no.php Log Message: Norwegian translation --- NEW FILE: no.php --- <?php // no.php - Norwegian strings and titles // Translation by Sven-Erik Anderson // ------------------------------------------------------------------------ // 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. // ------------------------------------------------------------------------ $STRING = array( 'nouser' => 'Denne brukeren eksisterer ikke', 'dupeofself' => 'En feil kan ikke være en kopi av seg selv', 'nobug' => 'Den feilen eksisterer ikke', 'givesummary' => 'Vennligst skriv et sammendrag', 'givedesc' => 'Vennligst skriv en beskrivelse', 'noprojects' => 'Ingen prosjekter funnet', 'totalbugs' => 'Totalt antall feil', 'giveemail' => 'Vennligst skriv en gyldig email adresse', 'loginused' => 'Det brukernavnet er allerede i bruk', 'newacctsubject' => 'phpBugTracker Innlogging', 'newacctmessage' => "Ditt phpBugTracker passord er %s", 'nobugs' => 'Ingen feiler funnet', 'givename' => 'Vennligst skriv et navn', 'edit' => 'Rediger', 'addnew' => 'Legg til ny', 'nooses' => 'Ingen OSer funnet', 'giveinitversion' => 'Vennligst skriv et versjonsnummer for prosjektet', 'giveversion' => 'Vennligst skriv et versjonsnummer', 'noversions' => 'Ingen versjoner funnet', 'nocomponents' => 'Ingen komponenter funnet', 'nostatses' => 'Ingen statuser funnet', 'givepassword' => 'Vennligst skriv inn et passord', 'nousers' => 'Ingen brukere funnet', 'bugbadperm' => 'Du kan ikke endre denne feilen', 'bugbadnum' => 'Denne feilen eksisterer ikke', 'datecollision' => 'Noen har oppdatert feilen siden sist du så den. Feil informasjonen har blitt lastet på nytt med de siste endringer.', 'passwordmatch' => 'Disse passordene er ikke like -- vennligst prøv igjen', 'nobughistory' => 'Det er ingen historie for denne feilen', 'logintomodify' => 'Du må være logget inn for å redigere denne feilen', 'dupe_attachment' => 'Vedlegget eksisterer allerede for denne feilen', 'give_attachment' => 'Vennligst spesifiser en fil for opplasting', 'no_attachment_save_path' => 'Kunne ikke finne en plass å lagre denne feilen!', 'attachment_path_not_writeable' => 'Kunne ikke opprette en fil i lagrings-stien', 'attachment_move_error' => 'Det oppstod en feil under flytting av den opplastede filen', 'bad_attachment' => 'Det vedlegget eksisterer ikke', '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' ); // Page titles $TITLE = array( 'enterbug' => 'Legg til en feil', 'editbug' => 'Rediger feil', 'newaccount' => 'Lag en ny konto', 'bugquery' => 'Feil spørring', 'buglist' => 'Feil-liste', 'addcomponent' => 'Legg til komponent', 'editcomponent' => 'Rediger komponent', 'addproject' => 'Legg til prosjekt', 'editproject' => 'Rediger prosjekt', 'addversion' => 'Legg til versjon', 'editversion' => 'Rediger versjon', 'project' => 'Prosjekter', 'os' => 'Operativ Systemer', 'resolution' => 'Oppløsninger', 'status' => 'Statuser', 'user' => 'Brukere', 'home' => 'Hjem', 'reporting' => 'Rapportering', 'severity' => 'Alvorlighet' ); ?> |
|
From: Javier S. <js...@si...> - 2001-08-28 23:22:59
|
Well the idea is to have different table names in 1 array .... this array is a global var .... it is a bit more complicated that just add a prefix ... But in fact it can be very usefull for some special application ... For example, when i use phpbt auth's phpbt tables for other personal application in the same site. So it would be more logical to have one unique table named user_auth ... You see what i mean ? :-) Patrick Mairif wrote: >On Tue, 28 Aug 2001, Ben Curtis wrote: > >>Hmm, I didn't see a suggestion from Javier -- either I missed it or he didn't send it to the list. :) >> > >I sent you a copy. > >>Cool! And, welcome aboard! >> > >thank you! :) > > >_______________________________________________ >phpbt-dev mailing list >php...@li... >http://lists.sourceforge.net/lists/listinfo/phpbt-dev > |
|
From: Patrick M. <mai...@st...> - 2001-08-28 20:57:06
|
On Tue, 28 Aug 2001, Ben Curtis wrote: > Hmm, I didn't see a suggestion from Javier -- either I missed it or he didn't send it to the list. :) I sent you a copy. > Cool! And, welcome aboard! thank you! :) |
|
From: Ben C. <php...@be...> - 2001-08-28 20:45:48
|
On Tue, Aug 28, 2001 at 10:35:56PM +0200, Patrick Mairif wrote: > On Tue, 28 Aug 2001, Ben Curtis wrote: > > What should happen is that a constant is added to config.php for the > > table name prefix, like phpbt_. Then constants need to be added for > > each table name using the prefix constant. Then all the queries need to > > be changed to use the new constants -- instead of "select from auth_user > > ..." it would be "select from ".USER_TABLE." ... > > Why not one constant for the prefix that is used in all queries? That's an alternative... let me let it roll around in my head a bit > > The other suggestion from Javier sounds good, too, but I think it is not > necessary. I think an array is a bit overloaded, isn't it? Hmm, I didn't see a suggestion from Javier -- either I missed it or he didn't send it to the list. :) > > > If you'd like to do this I can add you to the project as a developer. > > ok, I would do this, just add me! You've been added > > > It doesn't have to be right away, but it would also be nice to have this > > prefix configurable via the configure script and have that script change > > the db schema file accordingly. > > gonna see, what I can do. :) > Cool! And, welcome aboard! |
|
From: Patrick M. <mai...@st...> - 2001-08-28 20:36:02
|
On Tue, 28 Aug 2001, Ben Curtis wrote: > What should happen is that a constant is added to config.php for the > table name prefix, like phpbt_. Then constants need to be added for > each table name using the prefix constant. Then all the queries need to > be changed to use the new constants -- instead of "select from auth_user > ..." it would be "select from ".USER_TABLE." ... Why not one constant for the prefix that is used in all queries? The other suggestion from Javier sounds good, too, but I think it is not necessary. I think an array is a bit overloaded, isn't it? > If you'd like to do this I can add you to the project as a developer. ok, I would do this, just add me! > It doesn't have to be right away, but it would also be nice to have this > prefix configurable via the configure script and have that script change > the db schema file accordingly. gonna see, what I can do. :) |
|
From: Ben C. <php...@be...> - 2001-08-28 18:07:56
|
In case y'all are of the ircing type, I've set up (and even sometimes sit in) #phpbt on the openprojects servers. Feel free to drop in if you want to chat a bit. My nick is stympy. Of course, I may not always have time to chat, since I do have a day job. :) |
|
From: Ben C. <php...@be...> - 2001-08-28 18:05:07
|
I was thinking of this the other night. What should happen is that a constant is added to config.php for the table name prefix, like phpbt_. Then constants need to be added for each table name using the prefix constant. Then all the queries need to be changed to use the new constants -- instead of "select from auth_user ..." it would be "select from ".USER_TABLE." ... If you'd like to do this I can add you to the project as a developer. It doesn't have to be right away, but it would also be nice to have this prefix configurable via the configure script and have that script change the db schema file accordingly. On Tue, Aug 28, 2001 at 07:55:08PM +0200, Patrick Mairif wrote: > On Tue, 28 Aug 2001, Ben Curtis wrote: > > > Yup, createdb.sql hasn't been updated for the new db structure yet. > > But you can use dbchanges.sql and perms.sql to move to the new table > > structure. createdb.sql will be updated before the release is made -- I > > haven't done it yet because the database changes aren't final yet. :) > > perhaps there is space for additional suggestions, if the changes aren't > complete: > > My ISP let me use only one mysql database, so phpBT hast to share the > same db with my other projects. I'm sure more people are in this > situation, so tablenames starting with a prefix like 'BT_' or 'phpBT_' > would be great. > Is this possible? I could do the changes. > > greetz! > > > _______________________________________________ > phpbt-dev mailing list > php...@li... > http://lists.sourceforge.net/lists/listinfo/phpbt-dev |
|
From: Patrick M. <mai...@st...> - 2001-08-28 17:55:15
|
On Tue, 28 Aug 2001, Ben Curtis wrote: > Yup, createdb.sql hasn't been updated for the new db structure yet. > But you can use dbchanges.sql and perms.sql to move to the new table > structure. createdb.sql will be updated before the release is made -- I > haven't done it yet because the database changes aren't final yet. :) perhaps there is space for additional suggestions, if the changes aren't complete: My ISP let me use only one mysql database, so phpBT hast to share the same db with my other projects. I'm sure more people are in this situation, so tablenames starting with a prefix like 'BT_' or 'phpBT_' would be great. Is this possible? I could do the changes. greetz! |
|
From: Ben C. <php...@be...> - 2001-08-28 17:14:54
|
Yup, createdb.sql hasn't been updated for the new db structure yet. But you can use dbchanges.sql and perms.sql to move to the new table structure. createdb.sql will be updated before the release is made -- I haven't done it yet because the database changes aren't final yet. :) On Tue, Aug 28, 2001 at 06:02:48PM +0200, Patrick Mairif wrote: > Hello, > > I'm a bit confused. I just got the actual version from cvs. > The php-scripts use a new db structure but the file createdb.sql (and my > database of course) contains still the old one. > > greetz, patrick! > > > _______________________________________________ > phpbt-dev mailing list > php...@li... > http://lists.sourceforge.net/lists/listinfo/phpbt-dev |
|
From: Patrick M. <mai...@st...> - 2001-08-28 16:02:56
|
Hello, I'm a bit confused. I just got the actual version from cvs. The php-scripts use a new db structure but the file createdb.sql (and my database of course) contains still the old one. greetz, patrick! |
|
From: Benjamin C. <bc...@us...> - 2001-08-28 04:15:18
|
Update of /cvsroot/phpbt/phpbt/templates/default
In directory usw-pr-cvs1:/tmp/cvs-serv8930/templates/default
Modified Files:
newaccount.html
Log Message:
Handle the new login field for users and insert the user to group relationship in the database. user_group needs to change to include created and last_modified fields
Index: newaccount.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/newaccount.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- newaccount.html 2001/08/01 13:55:56 1.1
+++ newaccount.html 2001/08/28 04:15:15 1.2
@@ -1,11 +1,20 @@
<h2>Create a new account</h2>
<form action="{me}" method="post">
+<input type="hidden" name="createaccount" value="1">
<table border="0">
<tr>
<td align="center" colspan="2">
<font color="#ff0000">{error}</font>
</td>
</tr>
+ <!-- BEGIN loginentryarea -->
+ <tr>
+ <td align="right">Login: </td>
+ <td>
+ <input type="text" name="login" value="{login}">
+ </td>
+ </tr>
+ <!-- END loginentryarea -->
<tr>
<td align="right">Email: </td>
<td><input type="text" name="email" value="{email}"></td>
|
|
From: Benjamin C. <bc...@us...> - 2001-08-28 04:15:18
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv8930
Modified Files:
newaccount.php
Log Message:
Handle the new login field for users and insert the user to group relationship in the database. user_group needs to change to include created and last_modified fields
Index: newaccount.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/newaccount.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- newaccount.php 2001/08/25 18:39:11 1.12
+++ newaccount.php 2001/08/28 04:15:15 1.13
@@ -20,15 +20,18 @@
// 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';
function do_form() {
- global $q, $t, $email, $firstname, $lastname, $STRING, $now, $u;
+ global $q, $t, $login, $email, $firstname, $lastname, $STRING, $now, $u;
- if (!$email or !valid_email($email))
+ if (!EMAIL_IS_LOGIN && !$login = trim($login))
+ $error = $STRING['loginused'];
+ elseif (!$email or !valid_email($email))
$error = $STRING['giveemail'];
- elseif ($q->grab_field("select user_id from auth_user where email = '$email'"))
+ elseif ($q->grab_field("select user_id from auth_user where email = '$email' or login = '$login'"))
$error = $STRING['loginused'];
if ($error) {
show_form($error);
@@ -42,28 +45,40 @@
} else {
$mpassword = $password;
}
- $q->query("insert into auth_user (user_id, first_name, last_name, email, password, user_level, created_date, last_modified_date) values (".$q->nextid('user').", '$firstname', '$lastname', '$email', '$mpassword', 1, $now, $now)");
+ if (EMAIL_IS_LOGIN) $login = $email;
+ $user_id = $q->nextid('user');
+ $q->query("insert into auth_user (user_id, login, first_name, last_name, email, password, active, created_date, last_modified_date) values ($user_id, '$login', '$firstname', '$lastname', '$email', '$mpassword', 1, $now, $now)");
+ $q->query("insert into user_group (user_id, group_id) select $user_id, group_id from auth_group where group_name = 'user'");
mail($email, $STRING['newacctsubject'], sprintf($STRING['newacctmessage'],
$password), 'From: '.ADMINEMAIL);
$t->set_file('content','newaccountsuccess.html');
}
function show_form($error = '') {
- global $q, $t, $email, $firstname, $lastname;
+ global $q, $t, $login, $email, $firstname, $lastname;
$t->set_file('content','newaccount.html');
+ $t->set_block('content', 'loginentryarea', 'loginarea');
$t->set_var(array(
'error' => $error,
+ 'login' => stripslashes($login),
'email' => $email,
- 'firstname' => $firstname,
- 'lastname' => $lastname
+ 'firstname' => stripslashes($firstname),
+ 'lastname' => stripslashes($lastname)
));
+
+ // Show the login field if necessary
+ if (EMAIL_IS_LOGIN) {
+ $t->set_var('loginarea', '');
+ } else {
+ $t->parse('loginarea', 'loginentryarea', true);
+ }
}
$t->set_file('wrap','wrap.html');
$t->set_var('TITLE',$TITLE['newaccount']);
-if ($email) do_form();
+if ($_pv['createaccount']) do_form();
else show_form();
$t->pparse('main',array('content','wrap','main'));
|
|
From: Benjamin C. <bc...@us...> - 2001-08-28 04:14:02
|
Update of /cvsroot/phpbt/phpbt/templates/default
In directory usw-pr-cvs1:/tmp/cvs-serv8505/templates/default
Modified Files:
wrap.html
Log Message:
Adjust for the login field on the newaccount page
Index: wrap.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/default/wrap.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- wrap.html 2001/08/13 13:34:49 1.6
+++ wrap.html 2001/08/28 04:13:59 1.7
@@ -47,8 +47,7 @@
<font color="{loginerrorcolor}"><b>{loginerror}<b></font>
Email: <input type="text" name="username" class="login-box">
Password: <input type="password" name="password" class="login-box">
- <!--<input type="image" border="0" name="login" value="doit" src="go.gif" width="30" height="20" align="middle" class="login-button">-->
- <input type="hidden" name="login" value="1">
+ <input type="hidden" name="dologin" value="1">
<input type="submit" value="Login" class="login-box">
<input type="submit" name="sendpass" value="Email Password" class="login-box" title="Forgot your password? Have it sent to you">
</form>
|
|
From: Benjamin C. <bc...@us...> - 2001-08-28 04:14:02
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv8505
Modified Files:
include.php
Log Message:
Adjust for the login field on the newaccount page
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- include.php 2001/08/25 18:37:39 1.42
+++ include.php 2001/08/28 04:13:59 1.43
@@ -54,8 +54,8 @@
$me2 = $HTTP_SERVER_VARS['REQUEST_URI'];
$selrange = 30;
$now = time();
-$_gv = $HTTP_GET_VARS;
-$_pv = $HTTP_POST_VARS;
+$_gv = &$HTTP_GET_VARS;
+$_pv = &$HTTP_POST_VARS;
$all_db_fields = array(
'bug_id' => 'ID',
@@ -440,7 +440,7 @@
}
// Check to see if the user is trying to login
-if (isset($HTTP_POST_VARS['login'])) {
+if (isset($HTTP_POST_VARS['dologin'])) {
if (isset($HTTP_POST_VARS['sendpass'])) {
list($email, $password) = $q->grab("select email, password from auth_user where login = '$username' and active > 0");
if (!$q->num_rows()) {
|
|
From: Benjamin C. <bc...@us...> - 2001-08-28 03:51:36
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv1872 Modified Files: dbchanges.sql perms.sql Log Message: Some cleanup Index: dbchanges.sql =================================================================== RCS file: /cvsroot/phpbt/phpbt/dbchanges.sql,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- dbchanges.sql 2001/08/25 15:46:32 1.9 +++ dbchanges.sql 2001/08/28 03:51:33 1.10 @@ -149,9 +149,10 @@ `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`) + PRIMARY KEY (`user_id`), + UNIQUE login (login) ); -insert into auth_user select UserID, FirstName, LastName, Email, Password, if (UserLevel > 0, 1, 0), '', 0, CreatedDate, 0, CreatedDate from User; +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', Index: perms.sql =================================================================== RCS file: /cvsroot/phpbt/phpbt/perms.sql,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- perms.sql 2001/08/25 15:46:32 1.2 +++ perms.sql 2001/08/28 03:51:33 1.3 @@ -4,6 +4,7 @@ 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 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)); # Start off with two user levels... insert into auth_group (group_id, group_name) values (1, 'admin'); |
|
From: Benjamin C. <bc...@us...> - 2001-08-28 03:51:12
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv1781
Modified Files:
config.php
Log Message:
Added option for whether the email address is the login
Index: config.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- config.php 2001/08/23 02:28:52 1.4
+++ config.php 2001/08/28 03:51:09 1.5
@@ -43,6 +43,7 @@
define ('HIDE_EMAIL', 1); // Should email addresses be hidden for those not logged in?
// Should the query list use the severity colors as the row background color (like SourceForge)
define ('USE_SEVERITY_COLOR', 1);
+define ('EMAIL_IS_LOGIN', 1); // Whether to use email addresses as logins
// Sub-dir of the INSTALLPATH - Needs to be writeable by the web process
define ('ATTACHMENT_PATH', 'attachments');
|
|
From: Ben C. <php...@be...> - 2001-08-27 16:18:01
|
On Mon, Aug 27, 2001 at 11:45:13AM +0200, Javier Sixto wrote: > Ben Curtis wrote: > > >So, I took Kristian's (phplib author) ideas for a new auth schema > >(http://www.geocrawler.com/archives/3/195/2001/7/150/6234214/) as a > >starting point. Making the changes in the recent commit _will_ kill your > >ability to login to phpbt as a user -- just a warning. Of course, I'll try > >to get the login stuff working tomorrow so it won't be a problem too long. > >I just wanted to get the schema into your hands so you can poke at it and > >see what ideas come. > > > Well, it looks good and very powerfull ! :-) > Do you thnik this perms/auth modification will delayed reales 0.3.0 ? No, if we can get the email -> login done this week, it shouldn't. I still want to put the project/group membership off until 0.4.0. > > >This layout is flexible enough to assign users to groups, perms to groups, > >and even perms to users (though at the moment I don't think we have enough > >to perms to worry about perms to users). When new projects are created the > >project name should be entered into auth_group. These groups won't > >actually have perms assigned to them, but will be used for checking if > >users can work with certain projects. So I'm thinking of a function like > >member_of_group($projectname) would return a boolean or some such (it's too > >late for me to be thinking of implementation). :) > > > >So, feel free to give me some comments on whether you think this is way to > >achieve our goals. Oh, and Javier, I forgot to add the login_name to > >auth_user -- so feel free to do it or I'll do it tomorrow. > > > You are so fast ;-) > Just a notice : why we don't use a unique key for login field ?to avoid > any errors ? > I see you are using $Id: $ :-) Yup, the login field should be a unique key -- oversight on my part. |
|
From: Benjamin C. <bc...@us...> - 2001-08-25 18:39:13
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv13494/admin
Modified Files:
user.php
Log Message:
Moving towards the new user schema -- still work to do on the email -> login conversion
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- user.php 2001/08/23 01:39:03 1.16
+++ user.php 2001/08/25 18:39:11 1.17
@@ -38,10 +38,10 @@
if (!$userid) {
if (ENCRYPTPASS) $mpassword = md5($fpassword);
else $mpassword = $fpassword;
- $q->query("insert into user (user_id, first_name, last_name, email, password, user_level, created_date) values (".$q->nextid('user').", '$ffirstname', '$flastname', '$femail', '$mpassword', $usertype, $now)");
+ $q->query("insert into auth_user (user_id, first_name, last_name, email, password, user_level, created_date) values (".$q->nextid('user').", '$ffirstname', '$flastname', '$femail', '$mpassword', $usertype, $now)");
} else {
if (ENCRYPTPASS) {
- $oldpass = $q->grab_field("select password from user where user_id = $userid");
+ $oldpass = $q->grab_field("select password from auth_user where user_id = $userid");
if ($oldpass != $fpassword) {
$pquery = "password = '".md5($fpassword)."',";
} else {
@@ -50,7 +50,7 @@
} else {
$pquery = "password = '$fpassword',";
}
- $q->query("update user set first_name = '$ffirstname', last_name = '$flastname', email = '$femail', $pquery user_level = $usertype where user_id = '$userid'");
+ $q->query("update auth_user set first_name = '$ffirstname', last_name = '$flastname', email = '$femail', $pquery user_level = $usertype where user_id = '$userid'");
}
header("Location: $me?");
}
@@ -59,7 +59,7 @@
global $q, $me, $t, $firstname, $lastname, $email, $password, $usertype, $STRING;
if ($userid && !$error) {
- $row = $q->grab("select * from user where user_id = '$userid'");
+ $row = $q->grab("select * from auth_user where user_id = '$userid'");
$t->set_var(array(
'action' => $STRING['edit'],
'fuserid' => $row['user_id'],
@@ -102,7 +102,7 @@
'records' => $nr));
$q->query("select user_id, concat(first_name,' ',last_name) as fullname, email,
- created_date, user_level from user order by $order $sort
+ created_date, user_level from auth_user order by $order $sort
limit $llimit, $selrange");
if (!$q->num_rows()) {
|
|
From: Benjamin C. <bc...@us...> - 2001-08-25 18:39:13
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv13494
Modified Files:
bug.php newaccount.php query.php report.php user.php
Log Message:
Moving towards the new user schema -- still work to do on the email -> login conversion
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- bug.php 2001/08/23 02:03:16 1.29
+++ bug.php 2001/08/25 18:39:11 1.30
@@ -34,7 +34,7 @@
return;
}
- $q->query("select bh.*, email from bug_history bh left join user on created_by = user_id where bug_id = $bugid");
+ $q->query("select bh.*, email from bug_history bh left join auth_user on created_by = user_id where bug_id = $bugid");
if (!$q->num_rows()) {
show_text($STRING['nobughistory']);
return;
@@ -97,14 +97,14 @@
}
// Reporter never changes;
- $reporter = $q->grab_field("select email from user where user_id = {$buginfo['created_by']}");
+ $reporter = $q->grab_field("select email from auth_user where user_id = {$buginfo['created_by']}");
$reporterstat = ' ';
- $assignedto = $q->grab_field("select email from user where user_id = ". ($cf['assigned_to'] ? $cf['assigned_to'] : $buginfo['assigned_to']));
+ $assignedto = $q->grab_field("select email from auth_user where user_id = ". ($cf['assigned_to'] ? $cf['assigned_to'] : $buginfo['assigned_to']));
$assignedtostat = $cf['assigned_to'] ? '!' : ' ';
// If there are new comments grab the comments immediately before the latest
if ($comments) {
- $q->query("select u.email, c.comment_text, c.created_date from comment c, user u where bug_id = {$buginfo['bug_id']} and c.created_by = u.user_id order by created_date desc limit 2");
+ $q->query("select u.email, c.comment_text, c.created_date from comment c, auth_user u where bug_id = {$buginfo['bug_id']} and c.created_by = u.user_id order by created_date desc limit 2");
$row = $q->grab();
$t->set_var(array(
'newpostedby' => $row['email'],
@@ -115,7 +115,7 @@
// If this comment is the first additional comment after the creation of the
// bug then we need to grab the bug's description as the previous comment
if ($q->num_rows() < 2) {
- list($by, $on, $comments) = $q->grab("select u.email, b.created_date, b.description from bug b, user u where b.created_by = u.user_id and bug_id = {$buginfo['bug_id']}");
+ list($by, $on, $comments) = $q->grab("select u.email, b.created_date, b.description from bug b, auth_user u where b.created_by = u.user_id and bug_id = {$buginfo['bug_id']}");
$t->set_var(array(
'oldpostedby' => $by,
'oldpostedon' => date(TIMEFORMAT,$on).' on '.date(DATEFORMAT,$on),
@@ -187,7 +187,7 @@
}
if ($outcome == 'reassign' and
- (!$assignedto = $q->grab_field("select user_id from user where email = '$reassignto'"))) {
+ (!$assignedto = $q->grab_field("select user_id from auth_user where email = '$reassignto'"))) {
show_bug($bugid,array('status' => $STRING['nouser']));
return;
}
@@ -201,7 +201,7 @@
case 'unchanged' : break;
case 'assign' : $assignedto = $u; $statusfield = 'Assigned'; break;
case 'reassign' :
- if (!$assignedto = $q->grab_field("select user_id from user where email = '$reassignto'")) {
+ if (!$assignedto = $q->grab_field("select user_id from auth_user where email = '$reassignto'")) {
show_bug($bugid,array('status' => $STRING['nouser']));
return;
} else {
@@ -345,7 +345,7 @@
function show_bug($bugid = 0, $error = '') {
global $q, $me, $t, $project, $STRING, $u, $perm;
- if (!ereg('^[0-9]+$',$bugid) or !$row = $q->grab("select b.*, reporter.email as reporter, owner.email as owner, status_name, resolution_name from bug b left join resolution r using(resolution_id), severity sv, status st left join user owner on b.assigned_to = owner.user_id left join user reporter on b.created_by = reporter.user_id where bug_id = '$bugid' and b.severity_id = sv.severity_id and b.status_id = st.status_id")) {
+ if (!ereg('^[0-9]+$',$bugid) or !$row = $q->grab("select b.*, reporter.email as reporter, owner.email as owner, status_name, resolution_name from bug b left join resolution r using(resolution_id), severity sv, status st left join auth_user owner on b.assigned_to = owner.user_id left join auth_user reporter on b.created_by = reporter.user_id where bug_id = '$bugid' and b.severity_id = sv.severity_id and b.status_id = st.status_id")) {
show_text($STRING['bugbadnum'],true);
return;
}
@@ -444,7 +444,7 @@
}
}
- $q->query("select comment_text, comment.created_date, email from comment, user where bug_id = $bugid and comment.created_by = user_id order by comment.created_date");
+ $q->query("select comment_text, comment.created_date, email from comment, auth_user where bug_id = $bugid and comment.created_by = user_id order by comment.created_date");
if (!$q->num_rows()) {
$t->set_var('rows','');
} else {
Index: newaccount.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/newaccount.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- newaccount.php 2001/08/18 03:13:17 1.11
+++ newaccount.php 2001/08/25 18:39:11 1.12
@@ -28,7 +28,7 @@
if (!$email or !valid_email($email))
$error = $STRING['giveemail'];
- elseif ($q->grab_field("select user_id from user where email = '$email'"))
+ elseif ($q->grab_field("select user_id from auth_user where email = '$email'"))
$error = $STRING['loginused'];
if ($error) {
show_form($error);
@@ -42,7 +42,7 @@
} else {
$mpassword = $password;
}
- $q->query("insert into user (user_id, first_name, last_name, email, password, user_level, created_date, last_modified_date) values (".$q->nextid('user').", '$firstname', '$lastname', '$email', '$mpassword', 1, $now, $now)");
+ $q->query("insert into auth_user (user_id, first_name, last_name, email, password, user_level, created_date, last_modified_date) values (".$q->nextid('user').", '$firstname', '$lastname', '$email', '$mpassword', 1, $now, $now)");
mail($email, $STRING['newacctsubject'], sprintf($STRING['newacctmessage'],
$password), 'From: '.ADMINEMAIL);
$t->set_file('content','newaccountsuccess.html');
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- query.php 2001/08/23 12:53:49 1.23
+++ query.php 2001/08/25 18:39:11 1.24
@@ -172,7 +172,7 @@
}
if (!$order) { $order = 'bug_id'; $sort = 'asc'; }
if (!$querystring or $op) build_query($assignedto, $reportedby, $open);
- $nr = $q->grab_field("select count(*) from bug left join user owner on bug.assigned_to = owner.user_id left join user reporter on bug.created_by = reporter.user_id ".($querystring != '' ? "where $querystring": ''));
+ $nr = $q->grab_field("select count(*) from bug left join auth_user owner on bug.assigned_to = owner.user_id left join 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");
@@ -185,7 +185,7 @@
'project' => build_select('project'),
'TITLE' => $TITLE['buglist']));
- $q->query("select bug.*, reporter.email as reporter, owner.email as owner, lastmodifier.email as lastmodifier, project_name, severity_name, status_name, os_name, version_name, component_name, resolution_name, severity_color from bug left join resolution using (resolution_id), severity, status, os, version, component, project left join user owner on bug.assigned_to = owner.user_id left join user reporter on bug.created_by = reporter.user_id left join 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.email as reporter, owner.email as owner, lastmodifier.email as lastmodifier, project_name, severity_name, status_name, os_name, version_name, component_name, resolution_name, severity_color from bug left join resolution using (resolution_id), severity, status, os, version, component, project left join auth_user owner on bug.assigned_to = owner.user_id left join auth_user reporter on bug.created_by = reporter.user_id left join 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',
Index: report.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/report.php,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- report.php 2001/08/17 02:56:22 1.13
+++ report.php 2001/08/25 18:39:11 1.14
@@ -47,7 +47,7 @@
$projectquery = '';
}
- $q->query("$querystring, count(bug_id) as 'Total' from bug b left join user u on assigned_to = user_id $projectquery group by assigned_to");
+ $q->query("$querystring, count(bug_id) as 'Total' from bug b left join auth_user u on assigned_to = user_id $projectquery group by assigned_to");
if (!$q->num_rows()) {
$t->set_var('rows', 'No data to display');
} else {
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/user.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- user.php 2001/08/21 16:43:23 1.12
+++ user.php 2001/08/25 18:39:11 1.13
@@ -28,7 +28,7 @@
$auth->auth['db_fields'] = $column_list;
$column_list = serialize($column_list);
- $q->query("update user set bug_list_fields = '$column_list' where user_id = $u");
+ $q->query("update auth_user set bug_list_fields = '$column_list' where user_id = $u");
//$t->set_file('content', 'columnlistchanged.html');
show_text('Your bug list column preferences have been saved');
}
@@ -50,7 +50,7 @@
$mpassword = $pass1;
}
- $q->query("update user set password = '$mpassword' where user_id = $u");
+ $q->query("update auth_user set password = '$mpassword' where user_id = $u");
$t->set_file('content', 'passwordchanged.html');
}
|
|
From: Benjamin C. <bc...@us...> - 2001-08-25 18:37:43
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv13146
Modified Files:
include.php
Log Message:
Third time's the charm
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- include.php 2001/08/25 18:31:27 1.41
+++ include.php 2001/08/25 18:37:39 1.42
@@ -452,7 +452,7 @@
if (ENCRYPTPASS) {
$password = genpassword(10);
$mpassword = md5($password);
- $q->query("update user set password = '$mpassword' where login = '$username'");
+ $q->query("update auth_user set password = '$mpassword' where login = '$username'");
}
mail($email, $STRING['newacctsubject'], sprintf($STRING['newacctmessage'],
$password), 'From: '.ADMINEMAIL);
|
|
From: Benjamin C. <bc...@us...> - 2001-08-25 18:31:30
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv11908
Modified Files:
include.php
Log Message:
Login is working with the new schema -- really, this time :)
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- include.php 2001/08/25 18:28:47 1.40
+++ include.php 2001/08/25 18:31:27 1.41
@@ -296,7 +296,7 @@
}
break;
case 'owner' :
- $q->query("Select user_id, email from user where user_level > 1 order by email");
+ $q->query("select user_id, email from auth_user where user_level > 1 order by email");
while ($row = $q->grab()) {
if ($value == $row['user_id']) $sel = ' selected';
else $sel = '';
@@ -442,7 +442,7 @@
// Check to see if the user is trying to login
if (isset($HTTP_POST_VARS['login'])) {
if (isset($HTTP_POST_VARS['sendpass'])) {
- list($email, $password) = $q->grab("select email, password from user where email = '$username' and user_level > 0");
+ list($email, $password) = $q->grab("select email, password from auth_user where login = '$username' and active > 0");
if (!$q->num_rows()) {
$t->set_var(array(
'loginerrorcolor' => '#ff0000',
@@ -452,7 +452,7 @@
if (ENCRYPTPASS) {
$password = genpassword(10);
$mpassword = md5($password);
- $q->query("update user set password = '$mpassword' where email = '$username'");
+ $q->query("update user set password = '$mpassword' where login = '$username'");
}
mail($email, $STRING['newacctsubject'], sprintf($STRING['newacctmessage'],
$password), 'From: '.ADMINEMAIL);
|
|
From: Benjamin C. <bc...@us...> - 2001-08-25 18:28:50
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv11203
Modified Files:
include.php
Log Message:
Login is working with the new schema
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- include.php 2001/08/23 01:39:40 1.39
+++ include.php 2001/08/25 18:28:47 1.40
@@ -57,14 +57,6 @@
$_gv = $HTTP_GET_VARS;
$_pv = $HTTP_POST_VARS;
-$select['authlevels'] = array(
- 0 => 'Inactive',
- 1 => 'User',
- 3 => 'Developer',
- 7 => 'Manager',
- 15 => 'Administrator'
- );
-
$all_db_fields = array(
'bug_id' => 'ID',
'title' => 'Title',
@@ -126,15 +118,19 @@
if (ENCRYPTPASS) {
$password = md5($password);
}
- $u = $q->grab("select * from user where email = '$username' and password = '$password' and user_level > 0");
+ $u = $q->grab("select * from auth_user where login = '$username' and password = '$password' and active > 0");
if (!$q->num_rows()) {
return 'nobody';
} else {
- $this->auth['fname'] = $u['first_name'];
- $this->auth['lname'] = $u['last_name'];
- $this->auth['email'] = $u['email'];
- $this->auth['perm'] = $select['authlevels'][$u['user_level']];
$this->auth['db_fields'] = unserialize($u['bug_list_fields']);
+
+ // Grab group assignments and permissions based on groups
+ $q->query("select group_name, perm_name from auth_perm ap, group_perm gp, auth_group ag, 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;
+ }
+
return $u['user_id'];
}
}
@@ -147,14 +143,42 @@
class uperm extends Perm {
var $classname = 'uperm';
- var $permissions = array(
- 'Inactive' => 0,
- 'User' => 1,
- 'Developer' => 3,
- 'Manager' => 7,
- 'Administrator' => 15,
- );
-
+
+ function check_auth($auth_var, $reqs) {
+ global $auth;
+
+ // Administrators always pass
+ if ($auth->auth[$auth_var]['admin']) {
+ return true;
+ }
+
+ if (is_array($reqs)) {
+ foreach ($reqs as $req) {
+ if (!$auth->auth[$auth_var][$req]) {
+ return false;
+ }
+ }
+ } else {
+ if (!$auth->auth[$auth_var][$req]) {
+ return false;
+ }
+ }
+
+ // Didn't fail on any requirements? Then the user passes the check
+ return true;
+ }
+
+
+ function in_group($req_groups) {
+ return $this->check_auth('group', $req_groups);
+ }
+
+
+ function have_perm($req_perms) {
+ return $this->check_auth('perm', $req_perms);
+ }
+
+
function perm_invalid() {
global $t, $auth;
$t->set_file('content','badperm.html');
@@ -176,7 +200,7 @@
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 bug b left join status s using(status_id) where created_by = $u");
$this->set_var(array(
- 'loggedinas' => $auth->auth['email'],
+ 'loggedinas' => $auth->auth['uname'],
'liblock' => '',
'owner_open' => $owner_open,
'owner_closed' => $owner_closed,
|
|
From: Benjamin C. <bc...@us...> - 2001-08-25 15:46:36
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv2659 Modified Files: perms.sql dbchanges.sql Log Message: Added login field to auth_user Index: perms.sql =================================================================== RCS file: /cvsroot/phpbt/phpbt/perms.sql,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- perms.sql 2001/08/25 04:48:55 1.1 +++ perms.sql 2001/08/25 15:46:32 1.2 @@ -23,5 +23,6 @@ # 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; Index: dbchanges.sql =================================================================== RCS file: /cvsroot/phpbt/phpbt/dbchanges.sql,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- dbchanges.sql 2001/08/25 04:48:55 1.8 +++ dbchanges.sql 2001/08/25 15:46:32 1.9 @@ -138,6 +138,7 @@ 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 '', |
|
From: Ben C. <php...@be...> - 2001-08-25 04:59:53
|
So, I took Kristian's (phplib author) ideas for a new auth schema (http://www.geocrawler.com/archives/3/195/2001/7/150/6234214/) as a starting point. Making the changes in the recent commit _will_ kill your ability to login to phpbt as a user -- just a warning. Of course, I'll try to get the login stuff working tomorrow so it won't be a problem too long. I just wanted to get the schema into your hands so you can poke at it and see what ideas come. This layout is flexible enough to assign users to groups, perms to groups, and even perms to users (though at the moment I don't think we have enough to perms to worry about perms to users). When new projects are created the project name should be entered into auth_group. These groups won't actually have perms assigned to them, but will be used for checking if users can work with certain projects. So I'm thinking of a function like member_of_group($projectname) would return a boolean or some such (it's too late for me to be thinking of implementation). :) So, feel free to give me some comments on whether you think this is way to achieve our goals. Oh, and Javier, I forgot to add the login_name to auth_user -- so feel free to do it or I'll do it tomorrow. |
|
From: Benjamin C. <bc...@us...> - 2001-08-25 04:48:59
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv2677 Modified Files: dbchanges.sql Added Files: perms.sql Log Message: These changes _will_ break login ability -- you might want to make a copy of your database first! --- NEW FILE: perms.sql --- 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_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 bug_group (bug_id int unsigned not null, group_id int unsigned not null, primary key (bug_id, group_id), key (group_id)); # Start off with two user levels... insert into auth_group (group_id, group_name) values (1, 'admin'); insert into auth_group (group_id, group_name) values (2, 'user'); # ... and only two permissions (how quaint) insert into auth_perm (perm_id, perm_name) values (1, 'admin'); 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); # And user_id 1 is the admin insert into user_group (user_id, group_id) values (1, 1); # 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; update auth_user set active = 1 where active > 0; Index: dbchanges.sql =================================================================== RCS file: /cvsroot/phpbt/phpbt/dbchanges.sql,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- dbchanges.sql 2001/08/20 22:33:28 1.7 +++ dbchanges.sql 2001/08/25 04:48:55 1.8 @@ -136,13 +136,13 @@ ); insert into status select * from Status; -CREATE TABLE `user` ( +CREATE TABLE `auth_user` ( `user_id` int(10) unsigned NOT NULL default '0', `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 '', - `user_level` tinyint(3) unsigned NOT NULL default '1', + `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', @@ -150,7 +150,7 @@ `last_modified_date` bigint(20) unsigned NOT NULL default '0', PRIMARY KEY (`user_id`) ); -insert into user select UserID, FirstName, LastName, Email, Password, UserLevel, '', 0, CreatedDate, 0, CreatedDate from User; +insert into auth_user select UserID, 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', |