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-03 17:59:14
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv1500
Modified Files:
attachment.php bug.php
Log Message:
Use table constants in nextid()
Index: attachment.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/attachment.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- attachment.php 2001/09/01 15:44:20 1.7
+++ attachment.php 2001/09/03 17:59:11 1.8
@@ -114,7 +114,7 @@
}
@chmod("$filepath/$projectid/$filename", 0766);
- $q->query("insert into ".TBL_ATTACHMENT." (attachment_id, bug_id, file_name, description, file_size, mime_type, created_by, created_date) values (".$q->nextid('attachment').", $bugid, '{$HTTP_POST_FILES['attachment']['name']}', '$description', {$HTTP_POST_FILES['attachment']['size']}, '{$HTTP_POST_FILES['attachment']['type']}', $u, $now)");
+ $q->query("insert into ".TBL_ATTACHMENT." (attachment_id, bug_id, file_name, description, file_size, mime_type, created_by, created_date) values (".$q->nextid(TBL_ATTACHMENT).", $bugid, '{$HTTP_POST_FILES['attachment']['name']}', '$description', {$HTTP_POST_FILES['attachment']['size']}, '{$HTTP_POST_FILES['attachment']['type']}', $u, $now)");
$t->set_file('content', 'bugattachmentsuccess.html');
$t->set_var('bugid', $bugid);
}
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- bug.php 2001/09/03 15:09:46 1.37
+++ bug.php 2001/09/03 17:59:11 1.38
@@ -252,9 +252,9 @@
return;
}
$q->query("insert into ".TBL_COMMENT." (comment_id, bug_id, comment_text, created_by, created_date)"
- ." values (".$q->nextid('comment').", $dupenum, 'Bug #$bugid is a duplicate of this bug', $u, $now)");
+ ." values (".$q->nextid(TBL_COMMENT).", $dupenum, 'Bug #$bugid is a duplicate of this bug', $u, $now)");
$q->query("insert into ".TBL_COMMENT." (comment_id, bug_id, comment_text, created_by, created_date)"
- ." values (".$q->nextid('comment').", $bugid, 'This bug is a duplicate of bug #$dupenum', $u, $now)");
+ ." values (".$q->nextid(TBL_COMMENT).", $bugid, 'This bug is a duplicate of bug #$dupenum', $u, $now)");
$statusfield = 'Duplicate';
$bugresolution = $q->grab_field("select resolution_id from ".TBL_RESOLUTION." where resolution_name = 'Duplicate'");
$statusfield = 'Resolved';
@@ -283,7 +283,7 @@
if ($comments) {
$comments = htmlspecialchars($comments);
$q->query("insert into ".TBL_COMMENT." (comment_id, bug_id, comment_text, created_by, created_date)"
- ." values (".$q->nextid('comment').", $bugid, '$comments', $u, $now)");
+ ." values (".$q->nextid(TBL_COMMENT).", $bugid, '$comments', $u, $now)");
}
$q->query("update ".TBL_BUG." set title = '$title', url = '$url', severity_id = $severity_id, priority = $priority, ".($status ? "status_id = $status, " : ''). ($changeresolution ? "resolution_id = $bugresolution, " : ''). ($assignedto ? "assigned_to = $assignedto, " : '')." project_id = $project_id, version_id = $version_id, component_id = $component_id, os_id = $os_id, last_modified_by = $u, last_modified_date = $now where bug_id = $bugid");
@@ -311,7 +311,7 @@
$time = time();
if (!$bugid) {
$status = $q->grab_field("select status_id from ".TBL_STATUS." where status_name = 'Unconfirmed'");
- $q->query("insert into ".TBL_BUG." (bug_id, title, description, url, severity_id, priority, status_id, created_by, created_date, last_modified_by, last_modified_date, project_id, version_id, component_id, os_id, browser_string) values (".$q->nextid('bug').", '$title', '$description', '$url', $severity, $priority, $status, $u, $time, $u, $time, $project, $version, $component, '$os', '{$GLOBALS['HTTP_USER_AGENT']}')");
+ $q->query("insert into ".TBL_BUG." (bug_id, title, description, url, severity_id, priority, status_id, created_by, created_date, last_modified_by, last_modified_date, project_id, version_id, component_id, os_id, browser_string) values (".$q->nextid(TBL_BUG).", '$title', '$description', '$url', $severity, $priority, $status, $u, $time, $u, $time, $project, $version, $component, '$os', '{$GLOBALS['HTTP_USER_AGENT']}')");
} else {
$q->query("update ".TBL_BUG." set title = '$title', description = '$description', url = '$url', severity_id = '$severity', priority = '$priority', status_id = $status, assigned_to = '$assignedto', project_id = $project, version_id = $version, component_id = $component, os_id = '$os', browser_string = '{$GLOBALS['HTTP_USER_AGENT']}' last_modified_by = $u, last_modified_date = $time where bug_id = '$bugid'");
}
|
|
From: Ben C. <php...@be...> - 2001-09-03 17:57:11
|
I just tried it on my checkout and it works fine. On Mon, Sep 03, 2001 at 07:45:09PM +0200, Javier Sixto wrote: > Hello gys ;-) > > I have problems adding bugs ? > Database error: Invalid SQL: insert into bug (bug_id, title, > description, url, severity_id, priority, status_id, > created_by, created_date, last_modified_by, last_modified_date, > project_id, version_id, component_id, os_id, > browser_string) values (4, 'sdffd', 'sdfsfdsfd', '', 2, 2, 1, 2, > 999538846, 2, 999538846, 1, 1, 1, '1', 'Mozilla/4.7 [fr] > (WinNT; I)') > MySQL Error: 1054 (Unknown column 'title' in 'field list') > Session halted. > title-> bug_title > > The bug table queris modification is not completely terminted ? > Just looking for some debug work ;-) > is there any other pb or new features to implement ? > > > _______________________________________________ > phpbt-dev mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpbt-dev |
|
From: Javier S. <js...@si...> - 2001-09-03 17:45:53
|
Hello gys ;-) I have problems adding bugs ? Database error: Invalid SQL: insert into bug (bug_id, title, description, url, severity_id, priority, status_id, created_by, created_date, last_modified_by, last_modified_date, project_id, version_id, component_id, os_id, browser_string) values (4, 'sdffd', 'sdfsfdsfd', '', 2, 2, 1, 2, 999538846, 2, 999538846, 1, 1, 1, '1', 'Mozilla/4.7 [fr] (WinNT; I)') MySQL Error: 1054 (Unknown column 'title' in 'field list') Session halted. title-> bug_title The bug table queris modification is not completely terminted ? Just looking for some debug work ;-) is there any other pb or new features to implement ? |
|
From: Javier S. <ja...@us...> - 2001-09-03 17:36:10
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv29196
Modified Files:
include.php
Log Message:
build_select() change : mail -> login & userlevel > 1 replaced by active > 0
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- include.php 2001/09/03 17:00:27 1.48
+++ include.php 2001/09/03 17:36:07 1.49
@@ -326,11 +326,11 @@
}
break;
case 'owner' :
- $q->query("select user_id, email from ".TBL_AUTH_USER." where user_level > 1 order by email");
+ $q->query("select user_id, login from ".TBL_AUTH_USER." where active > 0 order by login");
while ($row = $q->grab()) {
if ($value == $row['user_id']) $sel = ' selected';
else $sel = '';
- $text .= "<option value=\"{$row['user_id']}\"$sel>{$row['email']}</option>";
+ $text .= "<option value=\"{$row['user_id']}\"$sel>{$row['login']}</option>";
}
break;
default :
|
|
From: Michael B. <mb...@us...> - 2001-09-03 17:33:43
|
Update of /cvsroot/phpbt/phpbt/languages In directory usw-pr-cvs1:/tmp/cvs-serv26575 Modified Files: ru_koi8-r.php ru_windows-1251.php Log Message: givelogin string translated Index: ru_koi8-r.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/ru_koi8-r.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ru_koi8-r.php 2001/09/03 17:03:22 1.2 +++ ru_koi8-r.php 2001/09/03 17:33:40 1.3 @@ -32,7 +32,7 @@ 'noprojects' => 'ðÒÏÅËÔÏ× ÎÅ ÎÁÊÄÅÎÏ', 'totalbugs' => '÷ÓÅÇÏ ÐÒÏÂÌÅÍ', 'giveemail' => 'ðÏÖÁÌÕÊÓÔÁ, ÕËÁÖÉÔÅ ÒÁÂÏÔÁÀÝÉÊ email-ÁÄÒÅÓ', - 'givelogin' => 'Please enter a login', + 'givelogin' => 'ðÏÖÁÌÕÊÓÔÁ, ÕËÁÖÉÔÅ ÌÏÇÉÎ', 'loginused' => 'ôÁËÏÊ ÌÏÇÉÎ ÕÖÅ ÚÁÎÑÔ', 'newacctsubject' => 'phpBugTracker Login', 'newacctmessage' => "÷ÁÛ ÐÁÒÏÌØ × phpBugTracker - %s", Index: ru_windows-1251.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/ru_windows-1251.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ru_windows-1251.php 2001/09/03 17:03:22 1.2 +++ ru_windows-1251.php 2001/09/03 17:33:40 1.3 @@ -1,6 +1,6 @@ <?php -// ru_windows-1251.php - Russian strings and titles, windows-1251 encoding +// ru_koi8-r.php - Russian strings and titles, windows-1251 encoding // ------------------------------------------------------------------------ // Copyright (c) 2001 The phpBugTracker Group // ------------------------------------------------------------------------ @@ -32,7 +32,7 @@ 'noprojects' => 'Ïðîåêòîâ íå íàéäåíî', 'totalbugs' => 'Âñåãî ïðîáëåì', 'giveemail' => 'Ïîæàëóéñòà, óêàæèòå ðàáîòàþùèé email-àäðåñ', - 'givelogin' => 'Please enter a login', + 'givelogin' => 'Ïîæàëóéñòà, óêàæèòå ëîãèí', 'loginused' => 'Òàêîé ëîãèí óæå çàíÿò', 'newacctsubject' => 'phpBugTracker Login', 'newacctmessage' => "Âàø ïàðîëü â phpBugTracker - %s", |
|
From: Javier S. <ja...@us...> - 2001-09-03 17:32:50
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv28400
Modified Files:
user.php
Log Message:
Use the table constants for nextid()
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- user.php 2001/09/03 17:30:22 1.21
+++ user.php 2001/09/03 17:32:47 1.22
@@ -38,7 +38,7 @@
if (!$userid) {
if (ENCRYPTPASS) $mpassword = md5($fpassword);
else $mpassword = $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, 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')");
} else {
|
|
From: Javier S. <ja...@us...> - 2001-09-03 17:30:24
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv27903
Modified Files:
user.php
Log Message:
Use the table constants for nextid()
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- user.php 2001/09/03 17:10:31 1.20
+++ user.php 2001/09/03 17:30:22 1.21
@@ -38,7 +38,7 @@
if (!$userid) {
if (ENCRYPTPASS) $mpassword = md5($fpassword);
else $mpassword = $fpassword;
- $new_user_id = $q->nextid('user');
+ $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')");
} else {
|
|
From: Benjamin C. <bc...@us...> - 2001-09-03 17:20:19
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv25666
Modified Files:
component.php os.php project.php resolution.php severity.php
status.php version.php
Log Message:
Use the table constants for nextid()
Index: component.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/component.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- component.php 2001/09/01 15:44:20 1.11
+++ component.php 2001/09/03 17:20:16 1.12
@@ -39,7 +39,7 @@
if (!$owner) $owner = 0;
if (!$active) $active = 0;
if (!$componentid) {
- $q->query("insert into component (component_id, project_id, component_name, component_desc, owner, active, created_by, created_date, last_modified_by, last_modified_date) values (".$q->nextid('component ').", $projectid, '$name', '$description', $owner, $active, $u, $time, $u, $time)");
+ $q->query("insert into ".TBL_COMPONENT." (component_id, project_id, component_name, component_desc, owner, active, created_by, created_date, last_modified_by, last_modified_date) values (".$q->nextid(TBL_COMPONENT).", $projectid, '$name', '$description', $owner, $active, $u, $time, $u, $time)");
} else {
$q->query("update ".TBL_COMPONENT." set component_name = '$name', component_desc = '$description', owner = $owner, active = $active, last_modified_by = $u, last_modified_date = $time where component_id = '$componentid'");
}
Index: os.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/os.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- os.php 2001/09/01 15:44:20 1.11
+++ os.php 2001/09/03 17:20:16 1.12
@@ -34,7 +34,7 @@
if ($error) { list_items($osid, $error); return; }
if (!$osid) {
- $q->query("insert into ".TBL_OS." (os_id, os_name, regex, sort_order) values (".$q->nextid('os').", '$fname', '$fregex', '$fsortorder')");
+ $q->query("insert into ".TBL_OS." (os_id, os_name, regex, sort_order) values (".$q->nextid(TBL_OS).", '$fname', '$fregex', '$fsortorder')");
} else {
$q->query("update ".TBL_OS." set os_name = '$fname', regex = '$fregex', sort_order = '$fsortorder' where os_id = '$osid'");
}
Index: project.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/project.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- project.php 2001/09/01 15:44:20 1.14
+++ project.php 2001/09/03 17:20:16 1.15
@@ -39,11 +39,11 @@
if (!$active) $active = 0;
if (!$projectid) {
- $projectid = $q->nextid('project');
+ $projectid = $q->nextid(TBL_PROJECT);
$q->query("insert into ".TBL_PROJECT." (project_id, project_name, project_desc, active, created_by, created_date)"
." values ($projectid , '$name', '$description', $active, $u, $now)");
$q->query("insert into ".TBL_VERSION." (version_id, project_id, version_name, active, created_by, created_date)"
- ." values (".$q->nextid('version').", $projectid, '$version', $active, $u, $now)");
+ ." values (".$q->nextid(TBL_VERSION).", $projectid, '$version', $active, $u, $now)");
$location = "component.php?op=add&projectid=$projectid";
} else {
$q->query("update ".TBL_PROJECT." set project_name = '$name', project_desc = '$description', active = $active where project_id = $projectid");
Index: resolution.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/resolution.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- resolution.php 2001/09/01 15:44:20 1.12
+++ resolution.php 2001/09/03 17:20:16 1.13
@@ -37,7 +37,7 @@
if (!$resolutionid) {
$q->query("insert into ".TBL_RESOLUTION." (resolution_id, resolution_name, resolution_desc, sort_order)"
- ." values (".$q->nextid('resolution').", '$fname', '$fdescription', '$fsortorder')");
+ ." values (".$q->nextid(TBL_RESOLUTION).", '$fname', '$fdescription', '$fsortorder')");
} else {
$q->query("update ".TBL_RESOLUTION." set resolution_name = '$fname', resolution_desc = '$fdescription', sort_order = '$fsortorder' where resolution_id = '$resolutionid'");
}
Index: severity.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/severity.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- severity.php 2001/09/01 15:44:20 1.5
+++ severity.php 2001/09/03 17:20:16 1.6
@@ -36,7 +36,7 @@
if ($error) { list_items($severityid, $error); return; }
if (!$severityid) {
- $q->query("insert into ".TBL_SEVERITY." (severity_id, severity_name, severity_desc, sort_order, severity_color) values (".$q->nextid('severity').", '$fname', '$fdescription', '$fsortorder', '$fcolor')");
+ $q->query("insert into ".TBL_SEVERITY." (severity_id, severity_name, severity_desc, sort_order, severity_color) values (".$q->nextid(TBL_SEVERITY).", '$fname', '$fdescription', '$fsortorder', '$fcolor')");
} else {
$q->query("update ".TBL_SEVERITY." set severity_name = '$fname', severity_desc = '$fdescription', sort_order = '$fsortorder', severity_color = '$fcolor' where severity_id = '$severityid'");
}
Index: status.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/status.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- status.php 2001/09/01 15:44:20 1.12
+++ status.php 2001/09/03 17:20:16 1.13
@@ -36,7 +36,7 @@
if ($error) { list_items($statusid, $error); return; }
if (!$statusid) {
- $q->query("insert into ".TBL_STATUS." (status_id, status_name, status_desc, sort_order) values (".$q->nextid('status').", '$fname', '$fdescription', '$fsortorder')");
+ $q->query("insert into ".TBL_STATUS." (status_id, status_name, status_desc, sort_order) values (".$q->nextid(TBL_STATUS).", '$fname', '$fdescription', '$fsortorder')");
} else {
$q->query("update ".TBL_STATUS." set status_name = '$fname', status_desc = '$fdescription', sort_order = '$fsortorder' where status_id = '$statusid'");
}
Index: version.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/version.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- version.php 2001/09/01 15:44:20 1.12
+++ version.php 2001/09/03 17:20:16 1.13
@@ -35,7 +35,7 @@
if (!$active) $active = 0;
if (!$versionid) {
- $q->query("insert into ".TBL_VERSION." (version_id, project_id, version_name, active, created_by, created_date) values (".$q->nextid('version').", $projectid, '$version', '$active', $u, $now)");
+ $q->query("insert into ".TBL_VERSION." (version_id, project_id, version_name, active, created_by, created_date) values (".$q->nextid(TBL_VERSION).", $projectid, '$version', '$active', $u, $now)");
} else {
$q->query("update ".TBL_VERSION." set project_id = $projectid, version_name = '$version', active = '$active' where version_id = '$versionid'");
}
|
|
From: Javier S. <ja...@us...> - 2001-09-03 17:11:15
|
Update of /cvsroot/phpbt/phpbt/admin/templates/default
In directory usw-pr-cvs1:/tmp/cvs-serv23726
Modified Files:
userlist.html
Log Message:
add new permission system
Index: userlist.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/templates/default/userlist.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- userlist.html 2001/08/01 13:55:56 1.1
+++ userlist.html 2001/09/03 17:11:12 1.2
@@ -1,73 +1,75 @@
<!--<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>
- <th><a href="{userlevelurl}">User Level</a></th>
- </tr>
- <!-- BEGIN row -->
- <tr bgcolor="{bgcolor}">
- <td><a href="{me}?op=edit&id={userid}">{email}</a></td>
- <td align="center">{name}</td>
- <td align="center">{date}</td>
- <td align="center">{userlevel}</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 colspan="2" align="center" valign="top">
- <font color="#ff0000">{error}</font>
- </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 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 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">UserType:</td>
- <td>
- <select name="usertype">
- {usertype}
- </select>
- </td>
- </tr>
- </table>
- <div align="right">
- <input type='submit' name='submit' value='Submit'>
- </div>
- </form>
- </td>
-</table>
+ <tr>
+ <td align="right" valign="top">User Group:</td>
+ <td>
+ <select name="fusergroup">
+ {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
|
|
From: Javier S. <ja...@us...> - 2001-09-03 17:10:33
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv23575
Modified Files:
user.php
Log Message:
little template bug
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- user.php 2001/09/03 17:02:40 1.19
+++ user.php 2001/09/03 17:10:31 1.20
@@ -110,7 +110,7 @@
'last' => $llimit+$selrange > $nr ? $nr : $llimit+$selrange,
'records' => $nr));
- $q->query("select user_id, concat(first_name,' ',last_name) as fullname, email,
+ $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");
|
|
From: Benjamin C. <bc...@us...> - 2001-09-03 17:03:58
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv22142
Modified Files:
newaccount.php
Log Message:
Use the new givelogin string
Index: newaccount.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/newaccount.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- newaccount.php 2001/09/01 15:44:20 1.15
+++ newaccount.php 2001/09/03 17:03:55 1.16
@@ -28,7 +28,7 @@
global $q, $t, $login, $email, $firstname, $lastname, $STRING, $now, $u;
if (!EMAIL_IS_LOGIN && !$login = trim($login))
- $error = $STRING['loginused'];
+ $error = $STRING['givelogin'];
elseif (!$email or !valid_email($email))
$error = $STRING['giveemail'];
elseif ($q->grab_field("select user_id from ".TBL_AUTH_USER." where email = '$email' or login = '$login'"))
|
|
From: Benjamin C. <bc...@us...> - 2001-09-03 17:03:25
|
Update of /cvsroot/phpbt/phpbt/languages In directory usw-pr-cvs1:/tmp/cvs-serv22033 Modified Files: de.php en.php no.php pt-br.php ru_koi8-r.php ru_windows-1251.php se.php Log Message: Added givelogin string Index: de.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/de.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- de.php 2001/08/29 08:05:39 1.4 +++ de.php 2001/09/03 17:03:22 1.5 @@ -23,10 +23,8 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, // MA 02111-1307, USA. // ------------------------------------------------------------------------- +// $Id$ - - - $STRING = array( 'lang_charset' => 'iso8859-1', 'nouser' => 'Dieser Benutzer extistiert nicht', @@ -37,6 +35,7 @@ 'noprojects' => 'Keine Projekte gefunden', 'totalbugs' => 'Total Bugs', 'giveemail' => 'Bitte geben Sie eine gültige E-mail Adresse ein.', + 'givelogin' => 'Please enter a login', 'loginused' => 'Dieser Benutzername ist schon in Gebrauch', 'newacctsubject' => 'phpBugTracker Login', 'newacctmessage' => "Ihr phpBugTracker Passwort ist %s", Index: en.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/en.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- en.php 2001/08/29 08:05:39 1.4 +++ en.php 2001/09/03 17:03:22 1.5 @@ -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$ $STRING = array( 'lang_charset' => 'us-ascii', @@ -31,6 +32,7 @@ 'noprojects' => 'No projects found', 'totalbugs' => 'Total Bugs', 'giveemail' => 'Please enter a valid email address', + 'givelogin' => 'Please enter a login', 'loginused' => 'That login has already been used', 'newacctsubject' => 'phpBugTracker Login', 'newacctmessage' => "Your phpBugTracker password is %s", Index: no.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/no.php,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- no.php 2001/08/29 08:05:39 1.2 +++ no.php 2001/09/03 17:03:22 1.3 @@ -21,6 +21,7 @@ // along with phpBugTracker; if not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // ------------------------------------------------------------------------ +// $Id$ $STRING = array( 'lang_charset' => 'iso8859-1', @@ -32,6 +33,7 @@ 'noprojects' => 'Ingen prosjekter funnet', 'totalbugs' => 'Totalt antall feil', 'giveemail' => 'Vennligst skriv en gyldig email adresse', + 'givelogin' => 'Please enter a login', 'loginused' => 'Det brukernavnet er allerede i bruk', 'newacctsubject' => 'phpBugTracker Innlogging', 'newacctmessage' => "Ditt phpBugTracker passord er %s", Index: pt-br.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/pt-br.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- pt-br.php 2001/08/29 08:05:39 1.4 +++ pt-br.php 2001/09/03 17:03:22 1.5 @@ -21,6 +21,7 @@ // along with phpBugTracker; if not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // ------------------------------------------------------------------------ +// $Id$ $STRING = array( 'lang_charset' => 'iso8859-1', @@ -32,6 +33,7 @@ 'noprojects' => 'Nenhum projeto encontrado', 'totalbugs' => 'Total de Bugs', 'giveemail' => 'Por favor, digite um endereço de email válido', + 'givelogin' => 'Please enter a login', 'loginused' => 'Este login já está sendo usado', 'newacctsubject' => 'phpBugTracker Login', 'newacctmessage' => "Sua senha phpBugTracker é %s", Index: ru_koi8-r.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/ru_koi8-r.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ru_koi8-r.php 2001/08/29 08:05:39 1.1 +++ ru_koi8-r.php 2001/09/03 17:03:22 1.2 @@ -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$ $STRING = array( 'lang_charset' => 'koi8-r', @@ -31,6 +32,7 @@ 'noprojects' => 'ðÒÏÅËÔÏ× ÎÅ ÎÁÊÄÅÎÏ', 'totalbugs' => '÷ÓÅÇÏ ÐÒÏÂÌÅÍ', 'giveemail' => 'ðÏÖÁÌÕÊÓÔÁ, ÕËÁÖÉÔÅ ÒÁÂÏÔÁÀÝÉÊ email-ÁÄÒÅÓ', + 'givelogin' => 'Please enter a login', 'loginused' => 'ôÁËÏÊ ÌÏÇÉÎ ÕÖÅ ÚÁÎÑÔ', 'newacctsubject' => 'phpBugTracker Login', 'newacctmessage' => "÷ÁÛ ÐÁÒÏÌØ × phpBugTracker - %s", Index: ru_windows-1251.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/ru_windows-1251.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ru_windows-1251.php 2001/08/29 08:05:39 1.1 +++ ru_windows-1251.php 2001/09/03 17:03:22 1.2 @@ -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$ $STRING = array( 'lang_charset' => 'windows-1251', @@ -31,6 +32,7 @@ 'noprojects' => 'Ïðîåêòîâ íå íàéäåíî', 'totalbugs' => 'Âñåãî ïðîáëåì', 'giveemail' => 'Ïîæàëóéñòà, óêàæèòå ðàáîòàþùèé email-àäðåñ', + 'givelogin' => 'Please enter a login', 'loginused' => 'Òàêîé ëîãèí óæå çàíÿò', 'newacctsubject' => 'phpBugTracker Login', 'newacctmessage' => "Âàø ïàðîëü â phpBugTracker - %s", Index: se.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/languages/se.php,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- se.php 2001/08/29 08:05:39 1.4 +++ se.php 2001/09/03 17:03:22 1.5 @@ -21,6 +21,7 @@ // along with phpBugTracker; if not, write to the Free Software Foundation, // Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // ------------------------------------------------------------------------ +// $Id$ $STRING = array( 'lang_charset' => 'iso8859-1', @@ -32,6 +33,7 @@ 'noprojects' => 'Hittade inga projekt', 'totalbugs' => 'Totalt antal buggar', 'giveemail' => 'Skriv in en giltig e-postadress', + 'givelogin' => 'Please enter a login', 'loginused' => 'Användarnamnet är redan taget', 'newacctsubject' => 'phpBugTracker inloggning', 'newacctmessage' => "Ditt lösenord i phpBugTracker är %s", |
|
From: Javier S. <ja...@us...> - 2001-09-03 17:02:42
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv21890
Modified Files:
user.php
Log Message:
Adding new permission system (simple adaptation, whitout multiple groups)
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- user.php 2001/09/01 15:44:20 1.18
+++ user.php 2001/09/03 17:02:40 1.19
@@ -26,7 +26,7 @@
include INCLUDE_PATH.'include.php';
function do_form($userid = 0) {
- global $q, $me, $ffirstname, $flastname, $femail, $fpassword, $usertype, $STRING, $now;
+ global $q, $me, $flogin, $ffirstname, $flastname, $femail, $fpassword, $fusergroup, $STRING, $now;
// Validation
if (!valid_email($femail))
@@ -38,7 +38,9 @@
if (!$userid) {
if (ENCRYPTPASS) $mpassword = md5($fpassword);
else $mpassword = $fpassword;
- $q->query("insert into ".TBL_AUTH_USER." (user_id, first_name, last_name, email, password, user_level, created_date) values (".$q->nextid('user').", '$ffirstname', '$flastname', '$femail', '$mpassword', $usertype, $now)");
+ $new_user_id = $q->nextid('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')");
} else {
if (ENCRYPTPASS) {
$oldpass = $q->grab_field("select password from ".TBL_AUTH_USER." where user_id = $userid");
@@ -50,35 +52,42 @@
} else {
$pquery = "password = '$fpassword',";
}
- $q->query("update ".TBL_AUTH_USER." set first_name = '$ffirstname', last_name = '$flastname', email = '$femail', $pquery user_level = $usertype where user_id = '$userid'");
+ $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'");
}
header("Location: $me?");
}
function show_form($userid = 0, $error = '') {
- global $q, $me, $t, $firstname, $lastname, $email, $password, $usertype, $STRING;
+ global $q, $me, $t, $login,$firstname, $lastname, $email, $password, $usertype, $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');
+
$t->set_var(array(
'action' => $STRING['edit'],
'fuserid' => $row['user_id'],
+ 'flogin' => $row['login'],
'ffirstname' => stripslashes($row['first_name']),
'flastname' => stripslashes($row['last_name']),
'femail' => $row['email'],
'fpassword' => $row['password'],
- 'usertype' => build_select('authlevels',$row['user_level']),
+ 'fusergroup' => build_select('group',$user_group_id),
'createddate' => $row['created_date']));
} 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),
- 'usertype' => build_select('authlevels',$usertype),
+ 'fusergroup' => build_select('group'),
'createddate' => $createddate));
}
}
@@ -102,7 +111,7 @@
'records' => $nr));
$q->query("select user_id, concat(first_name,' ',last_name) as fullname, email,
- created_date, user_level from ".TBL_AUTH_USER." order by $order $sort
+ created_date from ".TBL_AUTH_USER." order by $order $sort
limit $llimit, $selrange");
if (!$q->num_rows()) {
@@ -115,7 +124,6 @@
'name' => 'last_name',
'login' => 'email',
'password' => 'password',
- 'userlevel' => 'user_level',
'date' => 'created_date');
sorting_headers($me, $headers, $order, $sort);
@@ -124,9 +132,10 @@
$t->set_var(array(
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'userid' => $row['user_id'],
+ 'login' => $row['login'],
'name' => stripslashes($row['fullname']),
'email' => $row['email'],
- 'userlevel' => $select['authlevels'][$row['user_level']],
+ //'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);
}
@@ -150,4 +159,4 @@
page_close();
-?>
+?>
\ No newline at end of file
|
|
From: Javier S. <ja...@us...> - 2001-09-03 17:00:30
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv21337
Modified Files:
include.php
Log Message:
Add group to build_select()
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- include.php 2001/09/03 15:05:29 1.47
+++ include.php 2001/09/03 17:00:27 1.48
@@ -23,9 +23,9 @@
// $Id$
if (defined("INCLUDE_PATH")) {
- require INCLUDE_PATH."config.php";
+ require INCLUDE_PATH."config.php";
} else {
- require "config.php";
+ require "config.php";
}
// Edit this class with your database information
@@ -123,17 +123,17 @@
return 'nobody';
} else {
$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 ".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;
- }
-
+
+ // 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']}");
+ while (list($group, $perm) = $q->grab()) {
+ $this->auth['perm'][$perm] = true;
+ $this->auth['group'][$group] = true;
+ }
+
return $u['user_id'];
}
}
@@ -146,42 +146,42 @@
class uperm extends Perm {
var $classname = 'uperm';
-
- 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 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');
@@ -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' => '',
@@ -269,6 +269,7 @@
//create hash to map tablenames
$cfgDatabase=array(
+ 'group' => TBL_AUTH_GROUP,
'project' => TBL_PROJECT,
'component' => TBL_COMPONENT,
'status' => TBL_STATUS,
@@ -278,8 +279,9 @@
);
$text = '';
- $querystart = "select {$box}_id, {$box}_name from $cfgDatabase[$box]";
+ $querystart = "select {$box}_id, {$box}_name from $cfgDatabase[$box]";
$queries = array(
+ 'group' => $querystart.' 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',
@@ -289,6 +291,15 @@
);
switch($box) {
+ case 'group' :
+ $q->query($queries[$box]);
+ while ($row = $q->grab()) {
+ if ($value == $row[$box.'_id'] and $value != '') $sel = ' selected';
+ else $sel = '';
+ $text .= '<option value="'.
+ $row[$box.'_id']."\"$sel>".$row[$box.'_name'].'</option>';
+ }
+ break;
case 'severity' :
case 'status' :
case 'resolution' :
@@ -315,11 +326,11 @@
}
break;
case 'owner' :
- $q->query('select u.user_id, login from '.TBL_AUTH_USER.' u, '.TBL_USER_GROUP.' ug, '.TBL_AUTH_GROUP.' g where active > 0 and u.user_id = ug.user_id and ug.group_id = g.group_id and group_name = "Developer" order by login');
+ $q->query("select user_id, email from ".TBL_AUTH_USER." where user_level > 1 order by email");
while ($row = $q->grab()) {
if ($value == $row['user_id']) $sel = ' selected';
else $sel = '';
- $text .= "<option value=\"{$row['user_id']}\"$sel>{$row['login']}</option>";
+ $text .= "<option value=\"{$row['user_id']}\"$sel>{$row['email']}</option>";
}
break;
default :
@@ -491,4 +502,4 @@
}
}
-?>
+?>
\ No newline at end of file
|
|
From: Benjamin C. <bc...@us...> - 2001-09-03 15:09:50
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv25340
Modified Files:
bug.php
Log Message:
- Display login instead of email
- Fixed bug with change tracking
- Used the cfgDatabase array in the changed fields loop
- Prettied up the queries
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- bug.php 2001/09/01 16:14:29 1.36
+++ bug.php 2001/09/03 15:09:46 1.37
@@ -34,8 +34,9 @@
return;
}
- $q->query("select bh.*, email from ".TBL_BUG_HISTORY." bh left join ".TBL_AUTH_USER." on created_by = user_id"
- ." where bug_id = $bugid");
+ $q->query('select bh.*, login from '.TBL_BUG_HISTORY.' bh left join '
+ .TBL_AUTH_USER.' on bh.created_by = user_id'
+ ." where bug_id = $bugid");
if (!$q->num_rows()) {
show_text($STRING['nobughistory']);
return;
@@ -50,7 +51,7 @@
'field' => stripslashes($row['changed_field']),
'oldvalue' => stripslashes($row['old_value']),
'newvalue' => stripslashes($row['new_value']),
- 'createdby' => stripslashes(maskemail($row['email'])),
+ 'createdby' => stripslashes(maskemail($row['login'])),
'date' => date(DATEFORMAT.' '.TIMEFORMAT, $row['created_date'])
));
$t->parse('rows', 'row', true);
@@ -66,9 +67,11 @@
$t->set_block('emailout','commentblock', 'cblock');
foreach(array('title','url') as $field) {
if (isset($cf[$field])) {
- $q->query("insert into ".TBL_BUG_HISTORY
- ." (bug_id, changed_field, old_value, new_value, created_by, created_date)"
- ." values ({$buginfo['bug_id']}, '$field', '$buginfo[$field]', '$cf[$field]', $u, $now)");
+ $q->query('insert into '.TBL_BUG_HISTORY
+ .' (bug_id, changed_field, old_value, new_value, created_by, created_date)'
+ ." values ({$buginfo['bug_id']}, '$field', '"
+ .addslashes($buginfo[$field])."', '".addslashes($cf[$field])
+ ."', $u, $now)");
$t->set_var(array(
$field => $cf[$field],
$field.'_stat' => '!'
@@ -81,8 +84,8 @@
}
}
- //create array with tablenames for following loop
- $cfgDatabase=array(
+ // create array with tablenames for following loop
+ $cfgDatabase = array(
'project' => TBL_PROJECT,
'component' => TBL_COMPONENT,
'status' => TBL_STATUS,
@@ -92,16 +95,15 @@
'version' => TBL_VERSION
);
- foreach(array('project','component','status','resolution','severity','os',
- 'version') as $field) {
- $oldvalue = $q->grab_field("select ${field}_name from ".$cfgDatabase[$field]
- ." where ${field}_id = {$buginfo[$field.'_id']}");
- if ($cf[$field]) {
- $newvalue = $q->grab_field("select ${field}_name from ".$cfgDatabase[$field]
- ." where ${field}_id = $cf[$field]");
- $q->query("insert into ".TBL_BUG_HISTORY
- ." (bug_id, changed_field, old_value, new_value, created_by, created_date)"
- ." values ({$buginfo['bug_id']}, '$field', '$oldvalue', '$newvalue', $u, $now)");
+ foreach($cfgDatabase as $field => $table) {
+ $oldvalue = $q->grab_field("select ${field}_name from $table"
+ ." where ${field}_id = {$buginfo[$field.'_id']}");
+ if ($cf[$field.'_id']) {
+ $newvalue = $q->grab_field("select ${field}_name from $table"
+ ." where ${field}_id = {$cf[$field.'_id']}");
+ $q->query('insert into '.TBL_BUG_HISTORY
+ .' (bug_id, changed_field, old_value, new_value, created_by, created_date)'
+ ." values ({$buginfo['bug_id']}, '$field', '$oldvalue', '$newvalue', $u, $now)");
$t->set_var(array(
$field => stripslashes($newvalue),
$field.'Stat' => '!'
@@ -115,21 +117,23 @@
}
// Reporter never changes;
- $reporter = $q->grab_field("select email from ".TBL_AUTH_USER." where user_id = {$buginfo['created_by']}");
+ $reporter = $q->grab_field('select email from '.TBL_AUTH_USER
+ ." where user_id = {$buginfo['created_by']}");
$reporterstat = ' ';
- $assignedto = $q->grab_field("select email from ".TBL_AUTH_USER
- ." where user_id = ". ($cf['assigned_to'] ? $cf['assigned_to'] : $buginfo['assigned_to']));
+ $assignedto = $q->grab_field('select email from '.TBL_AUTH_USER
+ .' where user_id = '
+ .($cf['assigned_to'] ? $cf['assigned_to'] : $buginfo['assigned_to']));
$assignedtostat = $cf['assigned_to'] ? '!' : ' ';
// 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 ".TBL_COMMENT." c, ".TBL_AUTH_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.login, c.comment_text, c.created_date'
+ .' from '.TBL_COMMENT.' c, '.TBL_AUTH_USER.' u'
+ ." where bug_id = {$buginfo['bug_id']} and c.created_by = u.user_id"
+ .' order by created_date desc limit 2');
$row = $q->grab();
$t->set_var(array(
- 'newpostedby' => $row['email'],
+ 'newpostedby' => $row['login'],
'newpostedon' => date(TIMEFORMAT, $row['created_date']).' on '.
date(DATEFORMAT, $row['created_date']),
'newcomments' => textwrap('+ '.stripslashes($row['comment_text']),72,"\n+ ")
@@ -137,9 +141,9 @@
// 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 ".TBL_BUG." b, ".TBL_AUTH_USER." u"
- ." where b.created_by = u.user_id and bug_id = {$buginfo['bug_id']}");
+ list($by, $on, $comments) = $q->grab('select u.login, b.created_date, b.description'
+ .' from '.TBL_BUG.' b, '.TBL_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),
@@ -148,7 +152,7 @@
} else {
$row = $q->grab();
$t->set_var(array(
- 'oldpostedby' => $row['email'],
+ 'oldpostedby' => $row['login'],
'oldpostedon' => date(TIMEFORMAT,$row['created_date']).' on '.
date(DATEFORMAT,$row['created_date']),
'oldcomments' => textwrap(stripslashes($row['comment_text']),72)
@@ -200,7 +204,9 @@
elseif ($v and substr($v,0,7) != 'http://') $v = 'http://'.$v;
$url = $v;
}
- if (stripslashes($buginfo[$k]) != stripslashes($v)) { $changedfields[$k] = $v; }
+ if (stripslashes($buginfo[$k]) != stripslashes($v)) {
+ $changedfields[$k] = $v;
+ }
}
}
@@ -211,7 +217,7 @@
}
if ($outcome == 'reassign' and
- (!$assignedto = $q->grab_field("select user_id from ".TBL_AUTH_USER." where email = '$reassignto'"))) {
+ (!$assignedto = $q->grab_field("select user_id from ".TBL_AUTH_USER." where login = '$reassignto'"))) {
show_bug($bugid,array('status' => $STRING['nouser']));
return;
}
@@ -225,7 +231,7 @@
case 'unchanged' : break;
case 'assign' : $assignedto = $u; $statusfield = 'Assigned'; break;
case 'reassign' :
- if (!$assignedto = $q->grab_field("select user_id from ".TBL_AUTH_USER." where email = '$reassignto'")) {
+ if (!$assignedto = $q->grab_field("select user_id from ".TBL_AUTH_USER." where login = '$reassignto'")) {
show_bug($bugid,array('status' => $STRING['nouser']));
return;
} else {
@@ -372,12 +378,12 @@
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 ".TBL_BUG." b left join ".TBL_RESOLUTION." r using(resolution_id),"
- .TBL_SEVERITY." sv, ".TBL_STATUS." st left join ".TBL_AUTH_USER." owner on b.assigned_to=owner.user_id"
- ." left join ".TBL_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")) {
+ if (!ereg('^[0-9]+$',$bugid) or
+ !$row = $q->grab('select b.*, reporter.login as reporter, owner.login as owner, status_name, resolution_name'
+ .' from '.TBL_BUG.' b left join '.TBL_RESOLUTION.' r using(resolution_id),'
+ .TBL_SEVERITY.' sv, '.TBL_STATUS.' st left join '.TBL_AUTH_USER.' owner on b.assigned_to=owner.user_id'
+ .' left join '.TBL_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;
}
@@ -401,7 +407,7 @@
'severity' => build_select('severity',$row['severity_id']),
'priority' => build_select('priority',$row['priority']),
'status' => $row['status_name'],
- 'resolution' => $row['resolution_name'],
+ 'resolution' => $row['resolution_name'] ? $row['resolution_name'] : '',
'owner' => maskemail($row['owner']),
'reporter' => maskemail($row['reporter']),
'createddate' => date(DATEFORMAT,$row['created_date']),
@@ -476,9 +482,9 @@
}
}
- $q->query("select comment_text, c.created_date, email"
- ." from ".TBL_COMMENT." c, ".TBL_AUTH_USER
- ." where bug_id = $bugid and c.created_by = user_id order by c.created_date");
+ $q->query('select comment_text, c.created_date, login'
+ .' from '.TBL_COMMENT.' c, '.TBL_AUTH_USER
+ ." where bug_id = $bugid and c.created_by = user_id order by c.created_date");
if (!$q->num_rows()) {
$t->set_var('rows','');
} else {
@@ -487,7 +493,7 @@
'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
'rdescription' => eregi_replace('(bug)[[:space:]]*(#?)([0-9]+)',
"\\1 <a href='$me?op=show&bugid=\\3'>\\2\\3</a>",nl2br($row['comment_text'])),
- 'rreporter' => maskemail($row['email']),
+ 'rreporter' => maskemail($row['login']),
'rcreateddate' => date(TIMEFORMAT,$row['created_date']).' on '.
date(DATEFORMAT,$row['created_date'])
));
@@ -499,7 +505,7 @@
function show_projects() {
global $me, $q, $t, $project, $STRING;
- $q->query("select * from ".TBL_PROJECT." where active order by project_name");
+ $q->query('select * from '.TBL_PROJECT.' where active order by project_name');
switch ($q->num_rows()) {
case 0 :
$t->set_var('rows',$STRING['noprojects']);
|
|
From: Benjamin C. <bc...@us...> - 2001-09-03 15:07:58
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv25215 Modified Files: perms.sql Log Message: Capped the group names and added Developer group Index: perms.sql =================================================================== RCS file: /cvsroot/phpbt/phpbt/perms.sql,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- perms.sql 2001/08/28 03:51:33 1.3 +++ perms.sql 2001/09/03 15:07:54 1.4 @@ -7,12 +7,13 @@ 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'); -insert into auth_group (group_id, group_name) values (2, 'user'); +insert into auth_group (group_id, group_name) values (1, 'Admin'); +insert into auth_group (group_id, group_name) values (2, 'User'); +insert into auth_group (group_id, group_name) values (3, 'Developer'); # ... 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'); +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); |
|
From: Benjamin C. <bc...@us...> - 2001-09-03 15:05:33
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv24697
Modified Files:
include.php
Log Message:
Display login instead of email
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- include.php 2001/09/01 16:15:01 1.46
+++ include.php 2001/09/03 15:05:29 1.47
@@ -315,11 +315,11 @@
}
break;
case 'owner' :
- $q->query("select user_id, email from ".TBL_AUTH_USER." where user_level > 1 order by email");
+ $q->query('select u.user_id, login from '.TBL_AUTH_USER.' u, '.TBL_USER_GROUP.' ug, '.TBL_AUTH_GROUP.' g where 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 = '';
- $text .= "<option value=\"{$row['user_id']}\"$sel>{$row['email']}</option>";
+ $text .= "<option value=\"{$row['user_id']}\"$sel>{$row['login']}</option>";
}
break;
default :
|
|
From: Benjamin C. <bc...@us...> - 2001-09-03 15:04:53
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv24507
Modified Files:
config.php
Log Message:
Use require_once instead of require for including PHPlib
Index: config.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- config.php 2001/09/01 16:17:10 1.7
+++ config.php 2001/09/03 15:04:49 1.8
@@ -79,13 +79,13 @@
define ('TBL_BUG_GROUP', TBL_PREFIX.'bug_group');
define ('TBL_PROJECT_GROUP', TBL_PREFIX.'project_group');
-require PHPLIBPATH.'db_'.DB_TYPE.'.inc';
-require PHPLIBPATH.'ct_sql.inc';
-require PHPLIBPATH.'session.inc';
-require PHPLIBPATH.'auth.inc';
-require PHPLIBPATH.'perm.inc';
-require PHPLIBPATH.'page.inc';
-require PHPLIBPATH.'template.inc';
+require_once (PHPLIBPATH.'db_'.DB_TYPE.'.inc');
+require_once (PHPLIBPATH.'ct_sql.inc');
+require_once (PHPLIBPATH.'session.inc');
+require_once (PHPLIBPATH.'auth.inc');
+require_once (PHPLIBPATH.'perm.inc');
+require_once (PHPLIBPATH.'page.inc');
+require_once (PHPLIBPATH.'template.inc');
// Localization - include the file with the desired language
include INSTALLPATH.'/languages/en.php';
|
|
From: Patrick M. <mai...@st...> - 2001-09-03 05:08:29
|
On Sun, Sep 02, 2001 at 05:16:14PM -0700, Ben Curtis wrote: > This has been done. thanks! :) -- http://home.nikocity.de/mairif http://caravan-network.de ICQ# 96716515 |
|
From: Ben C. <php...@be...> - 2001-09-03 00:17:07
|
This has been done. On Sun, Sep 02, 2001 at 01:08:59PM +0200, Patrick Mairif wrote: > Hi, > > is it possible to set the reply-to in this mailinglist to phpbt-dev. > It often happens to me, that I hit reply and my mail goes only to the > author not to the list. > > -- > http://home.nikocity.de/mairif > http://caravan-network.de > ICQ# 96716515 > > _______________________________________________ > phpbt-dev mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpbt-dev |
|
From: Patrick M. <mai...@st...> - 2001-09-02 11:08:47
|
Hi, is it possible to set the reply-to in this mailinglist to phpbt-dev. It often happens to me, that I hit reply and my mail goes only to the author not to the list. -- http://home.nikocity.de/mairif http://caravan-network.de ICQ# 96716515 |
|
From: Patrick M. <mai...@st...> - 2001-09-02 11:06:33
|
On Sun, Sep 02, 2001 at 02:55:26AM +0200, Javier Sixto wrote: > About the "SQL queries problem" > I was thinking to extract all SQL queries (or sql bits), into one file, > it is just an idea to simplify database tunning or other code > maintenance ... PHP is not SQL, so why we mixed both every time ;-) ... > An important part of work made for a PHP application is SQL debugging, > isn't it ? > Perhaps it is a bad idea, because i have never see this done in any PHP > application ... > What do you think about ? > As i said it is just an idea ;-) I tried to do this in another project, but it showed up that the sql queries are often logically linked with the php code and debugging isn't simplified when it's splitted. -- http://home.nikocity.de/mairif http://caravan-network.de ICQ# 96716515 |
|
From: Patrick M. <mai...@st...> - 2001-09-02 10:54:39
|
> Well, grep does let you display lines after the match -- but how many should I specify when grepping? Two, four? Some queries are only one line -- some are four. I don't want non-query lines when grepping for queries, and I certainly don't want to cut off part of one. right, but it's a thing I could live with. > Looking at query.php, even the queries that are wrapped don't abide an 80 character limit -- most lines are still going past 80 columns. So, indenting here did little to improve editing in a terminal editor. Additionally, the indenting is not consistent and looks rather haphazard. If we are going to break-up and indent queries, I at least want them to look consistent and strictly abide the 80 column limit (as the rest of the code should). I agree. when I splitted the queries, it was just to make them readable and understandable for me. making it in a consistant manner would be better. I usually split befor 'from', 'where', 'left join', 'and', 'group', 'order', 'having' and where lines just are too long. -- http://home.nikocity.de/mairif http://caravan-network.de ICQ# 96716515 |
|
From: Javier S. <js...@si...> - 2001-09-02 00:54:15
|
I know the shell command grep, but can you explain to me, how do you work with it ? Are you using it just to find key words ? or to makes replacements ? I just want to undertstand how do you work ;-) About the "SQL queries problem" I was thinking to extract all SQL queries (or sql bits), into one file, it is just an idea to simplify database tunning or other code maintenance ... PHP is not SQL, so why we mixed both every time ;-) ... An important part of work made for a PHP application is SQL debugging, isn't it ? Perhaps it is a bad idea, because i have never see this done in any PHP application ... What do you think about ? As i said it is just an idea ;-) Ben Curtis wrote: >Well, grep does let you display lines after the match -- but how many should I specify when grepping? Two, four? Some queries are only one line -- some are four. I don't want non-query lines when grepping for queries, and I certainly don't want to cut off part of one. > >Looking at query.php, even the queries that are wrapped don't abide an 80 character limit -- most lines are still going past 80 columns. So, indenting here did little to improve editing in a terminal editor. Additionally, the indenting is not consistent and looks rather haphazard. If we are going to break-up and indent queries, I at least want them to look consistent and strictly abide the 80 column limit (as the rest of the code should). > >Since I want to get a release out, I'm not inclined now to go through all the code and beautify these queries, so I suggest at least for now that we go back to single lines for queries. Then after this release you can take another shot at convincing me that indented is better. :) > >On Sat, Sep 01, 2001 at 07:42:21PM +0200, Javier Sixto wrote: > >>I'm ok with you, i like to split queries too ;-) >> >>Patrick Mairif wrote: >> >>>On Sat, Sep 01, 2001 at 08:55:16AM -0700, Ben Curtis wrote: >>> >>>>With Patrick's last commit I was reminded that I need to get the coding >>>>standards document written. :) One thing I like is to keep queries all on >>>>one line (for ease in grepping). The downside is that it's not as easy to >>>>deal with in terminal text editors like vi and emacs. Thoughts? >>>> >>>you can tell grep to print some lines before and after match, so this >>>is no reason! And I think sql strings splitted over more lines >>>increases readability a lot! >>> > |
|
From: Ben C. <php...@be...> - 2001-09-02 00:00:00
|
Well, grep does let you display lines after the match -- but how many should I specify when grepping? Two, four? Some queries are only one line -- some are four. I don't want non-query lines when grepping for queries, and I certainly don't want to cut off part of one. Looking at query.php, even the queries that are wrapped don't abide an 80 character limit -- most lines are still going past 80 columns. So, indenting here did little to improve editing in a terminal editor. Additionally, the indenting is not consistent and looks rather haphazard. If we are going to break-up and indent queries, I at least want them to look consistent and strictly abide the 80 column limit (as the rest of the code should). Since I want to get a release out, I'm not inclined now to go through all the code and beautify these queries, so I suggest at least for now that we go back to single lines for queries. Then after this release you can take another shot at convincing me that indented is better. :) On Sat, Sep 01, 2001 at 07:42:21PM +0200, Javier Sixto wrote: > I'm ok with you, i like to split queries too ;-) > > Patrick Mairif wrote: > > >On Sat, Sep 01, 2001 at 08:55:16AM -0700, Ben Curtis wrote: > > > >>With Patrick's last commit I was reminded that I need to get the coding > >>standards document written. :) One thing I like is to keep queries all on > >>one line (for ease in grepping). The downside is that it's not as easy to > >>deal with in terminal text editors like vi and emacs. Thoughts? > >> > > > >you can tell grep to print some lines before and after match, so this > >is no reason! And I think sql strings splitted over more lines > >increases readability a lot! > > > > > > > > > _______________________________________________ > phpbt-dev mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/phpbt-dev |