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-25 03:36:07
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv25532
Modified Files:
INSTALL
Log Message:
Point to the right file for editing :)
Index: INSTALL
===================================================================
RCS file: /cvsroot/phpbt/phpbt/INSTALL,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- INSTALL 2001/08/22 22:34:52 1.6
+++ INSTALL 2001/08/25 03:36:04 1.7
@@ -11,7 +11,7 @@
-- or --
-5. Edit include.php as follows:
+5. Edit config.php as follows:
a. Change the INSTALLPATH and INSTALLURL variables to point the right
locations.
b. Change the ADMINEMAIL constant to what you want
|
|
From: Ben C. <php...@be...> - 2001-08-25 03:24:16
|
On Sat, Aug 25, 2001 at 03:34:15AM +0400, Michael Bravo wrote: > On Fri, 24 Aug 2001 15:12:59 -0700 > Ben Curtis <php...@be...> wrote: > > [lots skipped] > > for just dev staff might be useful. Of course, in this case, they > > probably _do_ have some way to track bugs on their v2, but it might be > > nice to have that flexibility in phpbt. Thoughts? > [the followup about despot settings considered] > > Well then, it seems that the consensus (heh, between the two of us so far :) ) is that we go ahead and implement the whole stuff: Heh, then we have a simple majority. :) > > - on/off self-registration > - user groups > - project permissions (though simple, only yes/no visibility) per user AND per group, with intersection > > out of this thread note: I received a CVS commit notice from sourceforge's tracker about a closing bug with the loss of component id, but it didn't show up in my working copy no matter how many updates I did (-A tried). Any ideas? Ah, yes, that change was made on a branch (phpbt-0_2_1p) which was branched from the tag from the last release, phpbt-0_2_1. That's why it's not showing up in your checkout, which is from the HEAD. You can checkout a copy of the branch with cvs co -r phpbt-0_2_1p -d <dest_dir> phpbt. I made the 0.2.2 release off that branch and tagged it phpbt-0_2_2. Further patches for 0.2.x would also be made on that branch since there are significant changes in the current HEAD. |
|
From: Michael B. <mb...@ta...> - 2001-08-24 23:34:28
|
On Fri, 24 Aug 2001 15:12:59 -0700 Ben Curtis <php...@be...> wrote: [lots skipped] > for just dev staff might be useful. Of course, in this case, they > probably _do_ have some way to track bugs on their v2, but it might be > nice to have that flexibility in phpbt. Thoughts? [the followup about despot settings considered] Well then, it seems that the consensus (heh, between the two of us so far :) ) is that we go ahead and implement the whole stuff: - on/off self-registration - user groups - project permissions (though simple, only yes/no visibility) per user AND per group, with intersection out of this thread note: I received a CVS commit notice from sourceforge's tracker about a closing bug with the loss of component id, but it didn't show up in my working copy no matter how many updates I did (-A tried). Any ideas? -- /\/\ike |
|
From: Ben C. <php...@be...> - 2001-08-24 22:15:19
|
> What I am thinking about is how do we combine the ability of users to self-register and the user-vs-project restrictions. It seems we will have to give bugtracker admin a choice of either running an open bugtracking system, a closed bugtracking system (i.e. disable self-registration capability altogether), or a combined one. In the latter case we will have to support an explicit marking of a project as publicly accessible. Oh, one thing I forgot on this part... I do want to copy bugzilla's despot setting, which allows the admin to shut down self-registrations. |
|
From: Ben C. <php...@be...> - 2001-08-24 22:13:11
|
Man, I've been too busy at work doing work to do the bug tracker. :) On Thu, Aug 23, 2001 at 02:19:31PM -0700, Ben Curtis wrote: > Forwarding to the list... :) > > ----- Forwarded message from Michael Bravo <mb...@ta...> ----- > > From: Michael Bravo <mb...@ta...> > To: Ben Curtis <php...@be...> > Subject: Re: [phpBT-dev] Postgres SQL problems > Organization: TAG Ltd > > On Thu, 23 Aug 2001 13:40:31 -0700 > Ben Curtis <php...@be...> wrote: > > > I'll also do some thinking on how I want to link users to projects, so > > this will help your desire, Michael to get the group restrictions going. > > Yeah, we can introduce the generic user-group model and link groups to projects, or we can skip the generic groups and do a somewhat custom user-vs-project thing. I was thinking about this... that would allow groups based on projects, and also groups based on other things such as access level or even department. Hmm, I wonder just how flexible we can get before adminning it becomes a burden. > > What I am thinking about is how do we combine the ability of users to self-register and the user-vs-project restrictions. It seems we will have to give bugtracker admin a choice of either running an open bugtracking system, a closed bugtracking system (i.e. disable self-registration capability altogether), or a combined one. In the latter case we will have to support an explicit marking of a project as publicly accessible. > Yeah, if you take a look at bugzilla, each project (or product) can be toggled on whether only members belonging to the project's group can see it. > Personally, I think the combined case is a little farfetched and mightn't be needed in real life cases. I mean, you are either running an internal bugtracker with your customers coming from outside and restricted to specific projects, or you are running an open source project and do not actually care about any such restrictions. What do you think? Well, I would agree, had I not had the following experience... I wanted to use phpBB (forum software) but not the cruddy old 1.4.x version, but the yet-to-be-released-and-very-alpha version 2. So, I started hacking away on it to get it to a working level (I didn't need all the functionality -- luckily I just needed the stuff that had been done to that point). But, as I was working on the integration, I found bugs and attempted to submit them via their sourceforge bug tracker. These were promptly closed with a comment like "v2 is still under development -- no bug reports on it please". So, in this case, having a publicly available tracker for a stable version and another tracker restricted for just dev staff might be useful. Of course, in this case, they probably _do_ have some way to track bugs on their v2, but it might be nice to have that flexibility in phpbt. Thoughts? |
|
From: Benjamin C. <bc...@us...> - 2001-08-24 03:13:07
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv7280
Modified Files:
Tag: phpbt-0_2_1p
bug.php
Log Message:
Fixes bug with "Assign to owner of component"
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.26
retrieving revision 1.26.2.1
diff -u -r1.26 -r1.26.2.1
--- bug.php 2001/08/11 17:28:43 1.26
+++ bug.php 2001/08/24 03:13:03 1.26.2.1
@@ -210,7 +210,7 @@
break;
}
case 'reassigntocomponent' :
- $assignedto = $q->grab_field("select Owner from Component where ComponentID = $component");
+ $assignedto = $q->grab_field("select Owner from Component where ComponentID = $Component");
$statusfield = 'Assigned'; break;
case 'dupe' :
$changeresolution = true;
|
|
From: Ben C. <php...@be...> - 2001-08-23 21:19:39
|
Forwarding to the list... :) ----- Forwarded message from Michael Bravo <mb...@ta...> ----- From: Michael Bravo <mb...@ta...> To: Ben Curtis <php...@be...> Subject: Re: [phpBT-dev] Postgres SQL problems Organization: TAG Ltd On Thu, 23 Aug 2001 13:40:31 -0700 Ben Curtis <php...@be...> wrote: > I'll also do some thinking on how I want to link users to projects, so > this will help your desire, Michael to get the group restrictions going. Yeah, we can introduce the generic user-group model and link groups to projects, or we can skip the generic groups and do a somewhat custom user-vs-project thing. What I am thinking about is how do we combine the ability of users to self-register and the user-vs-project restrictions. It seems we will have to give bugtracker admin a choice of either running an open bugtracking system, a closed bugtracking system (i.e. disable self-registration capability altogether), or a combined one. In the latter case we will have to support an explicit marking of a project as publicly accessible. Personally, I think the combined case is a little farfetched and mightn't be needed in real life cases. I mean, you are either running an internal bugtracker with your customers coming from outside and restricted to specific projects, or you are running an open source project and do not actually care about any such restrictions. What do you think? -- /\/\ike ----- End forwarded message ----- |
|
From: Ben C. <php...@be...> - 2001-08-23 20:40:41
|
Javier, I'm going to repost your email to me here as now there are three people watching this list. :) --- Javier wrote --- The actual database schema have som conflicts whith SQL key words ... have a look at http://www.fr.postgresql.org/devel-corner/docs/postgres/sql-keywords-appendix.html#KEYWORDS-TABLE there is some words like 'user' which doesn't work without "" :-( A prefer to let you make the choice of the new table names ... ------- Well, I guess this is as good an impetus as any for me to get off my butt and do the user table correctly. This will probably push 0.3.0 back a week but I think it's worth it. I don't know exactly how it's going to work yet, but here's what I'm thinking so far. I'm open to suggestions on it. For more background on the issues with user info tables you can see the phplib-users list at sourceforge and the phplib list at netuse.de. You don't really need that background, though, to catch up with what I want to do. Javier, you should like this, as it will also address the desire you had to use a login name that was not an email address. :) So here's the deal: the user table will have to change names (I'm not sure to what yet) so we can use it unquoted in postgres. At the same time I will add a user_name field that will be used for logging in. Admins will have the option of just using the email address for login, in which case the email address will be in both the user_name field and the email field. I'll also do some thinking on how I want to link users to projects, so this will help your desire, Michael to get the group restrictions going. So, the changes aren't really that complicated after all, but I want to make sure I have plenty of time to think it out so that it will be flexible enough for our needs. Comments? |
|
From: Benjamin C. <bc...@us...> - 2001-08-23 12:53:53
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv15187
Modified Files:
query.php
Log Message:
Show the form with no statuses selected so you can see all bugs just by hitting submit
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- query.php 2001/08/21 16:43:23 1.22
+++ query.php 2001/08/23 12:53:49 1.23
@@ -83,7 +83,7 @@
$t->set_var(array(
'js' => $js,
- 'status' => build_select('status',$q->grab_field("select status_id from status where status_name = 'New'")),
+ 'status' => build_select('status',$status),
'resolution' => build_select('resolution',$resolution),
'os' => build_select('os',-1), // Prevent the OS regex selection
'priority' => build_select('priority',$priority),
|
|
From: Javier S. <ja...@us...> - 2001-08-23 10:14:23
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv6899
Added Files:
createdb_pg.sql
Log Message:
PostgresSQL tables.
There some conflict pb whith SQL reserved Key Words.
(user for example)
--- NEW FILE: createdb_pg.sql ---
BEGIN;
-- Host: localhost Database: bugtracker
----------------------------------------------------------
-- $Id: createdb_pg.sql,v 1.1 2001/08/23 10:14:19 javyer Exp $
-- Table structure for table 'active_sessions'
--
CREATE TABLE "active_sessions" (
"sid" varchar(32) NOT NULL DEFAULT '',
"name" varchar(32) NOT NULL DEFAULT '',
"val" text,
"changed" varchar(14) NOT NULL DEFAULT '',
PRIMARY KEY (name,sid)
);
-- Table structure for table 'attachment'
--
CREATE TABLE "attachment" (
"attachment_id" INT4 NOT NULL DEFAULT '0',
"bug_id" INT4 NOT NULL DEFAULT '0',
"file_name" char(255) NOT NULL DEFAULT '',
"description" char(255) NOT NULL DEFAULT '',
"file_size" INT8 NOT NULL DEFAULT '0',
"mime_type" char(30) NOT NULL DEFAULT '',
"created_by" INT4 NOT NULL DEFAULT '0',
"created_date" INT8 NOT NULL DEFAULT '0',
PRIMARY KEY (attachment_id)
);
--
-- Table structure for table 'bug'
--
CREATE TABLE "bug" (
"bug_id" INT4 NOT NULL DEFAULT '0',
"bug_title" varchar(100) NOT NULL DEFAULT '',
"bug_desc" "text" NOT NULL,
"bug_url" varchar(255) NOT NULL DEFAULT '',
"severity_id" INT2 NOT NULL DEFAULT '0',
"priority" INT2 NOT NULL DEFAULT '0',
"status_id" INT2 NOT NULL DEFAULT '0',
"resolution_id" INT2 NOT NULL DEFAULT '0',
"assigned_to" INT4 NOT NULL DEFAULT '0',
"created_by" INT4 NOT NULL DEFAULT '0',
"created_date" INT8 NOT NULL DEFAULT '0',
"last_modified_by" INT4 NOT NULL DEFAULT '0',
"last_modified_date" INT8 NOT NULL DEFAULT '0',
"project_id" INT4 NOT NULL DEFAULT '0',
"version_id" INT4 NOT NULL DEFAULT '0',
"component_id" INT4 NOT NULL DEFAULT '0',
"op_sys_id" INT2 NOT NULL DEFAULT '0',
"browser_string" varchar(255) NOT NULL DEFAULT '',
"close_date" INT8 NOT NULL DEFAULT '0',
PRIMARY KEY (bug_id)
);
--
-- Table structure for table 'bug_history'
--
CREATE TABLE "bug_history" (
"bug_id" INT4 NOT NULL DEFAULT '0',
"changed_field" char(20) NOT NULL DEFAULT '',
"old_value" char(255) NOT NULL DEFAULT '',
"new_value" char(255) NOT NULL DEFAULT '',
"created_by" INT4 NOT NULL DEFAULT '0',
"created_date" INT8 NOT NULL DEFAULT '0'
);
--
-- Table structure for table 'comment'
--
CREATE TABLE "comment" (
"comment_id" INT4 NOT NULL DEFAULT '0',
"bug_id" INT4 NOT NULL DEFAULT '0',
"comment_text" "text" NOT NULL,
"created_by" INT4 NOT NULL DEFAULT '0',
"created_date" INT8 NOT NULL DEFAULT '0',
PRIMARY KEY (comment_id)
);
--
-- Table structure for table 'component'
--
CREATE TABLE "component" (
"component_id" INT4 NOT NULL DEFAULT '0',
"project_id" INT4 NOT NULL DEFAULT '0',
"component_name" varchar(30) NOT NULL DEFAULT '',
"component_desc" "text" NOT NULL,
"owner" INT4 NOT NULL DEFAULT '0',
"active" INT2 NOT NULL DEFAULT '1',
"created_by" INT4 NOT NULL DEFAULT '0',
"created_date" INT8 NOT NULL DEFAULT '0',
"last_modified_by" INT4 NOT NULL DEFAULT '0',
"last_modified_date" INT8 NOT NULL DEFAULT '0',
PRIMARY KEY (component_id)
);
--
-- Table structure for table 'db_sequence'
--
CREATE TABLE "db_sequence" (
"seq_name" varchar(127) NOT NULL DEFAULT '',
"nextid" INT4 NOT NULL DEFAULT '0',
PRIMARY KEY (seq_name)
);
--
-- Dumping data for table 'db_sequence'
--
INSERT INTO "db_sequence" VALUES ('User',2);
INSERT INTO "db_sequence" VALUES ('OS',30);
INSERT INTO "db_sequence" VALUES ('Resolution',6);
INSERT INTO "db_sequence" VALUES ('Severity',7);
INSERT INTO "db_sequence" VALUES ('Status',7);
INSERT INTO "db_sequence" VALUES ('project',1);
INSERT INTO "db_sequence" VALUES ('version',1);
INSERT INTO "db_sequence" VALUES ('component',1);
--
-- Table structure for table 'os'
--
CREATE TABLE "os" (
"os_id" INT4 NOT NULL DEFAULT '0',
"os_name" char(30) NOT NULL DEFAULT '',
"sort_order" INT2 NOT NULL DEFAULT '0',
"regex" char(40) NOT NULL DEFAULT '',
PRIMARY KEY (os_id)
);
--
-- Dumping data for table 'os'
--
INSERT INTO "os" VALUES (1,'All',1,'');
INSERT INTO "os" VALUES (2,'Windows 3.1',2,'/Mozilla.*\\(Win16.*\\)/');
INSERT INTO "os" VALUES (3,'Windows 95',3,'/Mozilla.*\\(.*;.*; 32bit.*\\)/');
INSERT INTO "os" VALUES (4,'Windows 98',4,'/Mozilla.*\\(Win98.*\\)/');
INSERT INTO "os" VALUES (5,'Windows ME',5,'');
INSERT INTO "os" VALUES (6,'Windows 2000',6,'/Mozilla.*Windows NT 5.*\\)/');
INSERT INTO "os" VALUES (7,'Windows NT',7,'/Mozilla.*\\(Windows.*NT/');
INSERT INTO "os" VALUES (8,'Mac System 7',8,'');
INSERT INTO "os" VALUES (9,'Mac System 7.5',9,'');
INSERT INTO "os" VALUES (10,'Mac System 7.6.1',10,'');
INSERT INTO "os" VALUES (11,'Mac System 8.0',11,'');
INSERT INTO "os" VALUES (12,'Mac System 8.5',12,'/Mozilla.*\\(.*;.*; 68K.*\\)/');
INSERT INTO "os" VALUES (13,'Mac System 8.6',13,'/Mozilla.*\\(.*;.*; PPC.*\\)/');
INSERT INTO "os" VALUES (14,'Mac System 9.0',14,'');
INSERT INTO "os" VALUES (15,'Linux',15,'/Mozilla.*\\(.*;.*; Linux.*\\)/');
INSERT INTO "os" VALUES (16,'BSDI',16,'/Mozilla.*\\(.*;.*; BSD\\/OS.*\\)/');
INSERT INTO "os" VALUES (17,'FreeBSD',17,'/Mozilla.*\\(.*;.*; FreeBSD.*\\)/');
INSERT INTO "os" VALUES (18,'NetBSD',18,'');
INSERT INTO "os" VALUES (19,'OpenBSD',19,'');
INSERT INTO "os" VALUES (20,'AIX',20,'/Mozilla.*\\(.*;.*; AIX.*\\)/');
INSERT INTO "os" VALUES (21,'BeOS',21,'');
INSERT INTO "os" VALUES (22,'HP-UX',22,'/Mozilla.*\\(.*;.*; HP-UX.*\\)/');
INSERT INTO "os" VALUES (23,'IRIX',23,'/Mozilla.*\\(.*;.*; IRIX.*\\)/');
INSERT INTO "os" VALUES (24,'Neutrino',24,'');
INSERT INTO "os" VALUES (25,'OpenVMS',25,'');
INSERT INTO "os" VALUES (26,'OS/2',26,'');
INSERT INTO "os" VALUES (27,'OSF/1',27,'/Mozilla.*\\(.*;.*; OSF.*\\)/');
INSERT INTO "os" VALUES (28,'Solaris',28,'/Mozilla.*\\(.*;.*; SunOS 5.*\\)/');
INSERT INTO "os" VALUES (29,'SunOS',29,'/Mozilla.*\\(.*;.*; SunOS.*\\)/');
INSERT INTO "os" VALUES (30,'other',30,'');
--
-- Table structure for table 'project'
--
CREATE TABLE "project" (
"project_id" INT4 NOT NULL DEFAULT '0',
"project_name" varchar(30) NOT NULL DEFAULT '',
"project_desc" "text" NOT NULL,
"active" INT2 NOT NULL DEFAULT '1',
"created_by" INT4 NOT NULL DEFAULT '0',
"created_date" INT8 NOT NULL DEFAULT '0',
"last_modified_by" INT4 NOT NULL DEFAULT '0',
"last_modified_date" INT8 NOT NULL DEFAULT '0',
PRIMARY KEY (project_id)
);
CREATE TABLE "resolution" (
"resolution_id" INT4 NOT NULL DEFAULT '0',
"resolution_name" varchar(30) NOT NULL DEFAULT '',
"resolution_desc" "text" NOT NULL,
"sort_order" INT2 NOT NULL DEFAULT '0',
PRIMARY KEY (resolution_id)
);
--
-- Dumping data for table 'resolution'
--
INSERT INTO "resolution" VALUES (1,'Fixed','Bug was eliminated',1);
INSERT INTO "resolution" VALUES (2,'Not a bug','It\'s not a bug -- it\'s a feature!',2);
INSERT INTO "resolution" VALUES (3,'Won\'t Fix','This bug will stay',3);
INSERT INTO "resolution" VALUES (4,'Deferred','We\'ll get around to it later',4);
INSERT INTO "resolution" VALUES (5,'Works for me','Can\'t replicate the bug',5);
INSERT INTO "resolution" VALUES (6,'Duplicate','',6);
--
-- Table structure for table 'saved_query'
--
CREATE TABLE "saved_query" (
"saved_query_id" INT4 NOT NULL DEFAULT '0',
"user_id" INT4 NOT NULL DEFAULT '0',
"saved_query_name" varchar(40) NOT NULL DEFAULT '',
"saved_query_string" "text" NOT NULL,
PRIMARY KEY (saved_query_id,user_id)
);
--
-- Table structure for table 'severity'
--
CREATE TABLE "severity" (
"severity_id" INT4 NOT NULL DEFAULT '0',
"severity_name" varchar(30) NOT NULL DEFAULT '',
"severity_desc" "text" NOT NULL,
"sort_order" INT2 NOT NULL DEFAULT '0',
"severity_color" varchar(10) NOT NULL DEFAULT '--FFFFFF',
PRIMARY KEY (severity_id)
);
--
-- Dumping data for table 'severity'
--
INSERT INTO "severity" VALUES (1,'Unassigned','Default bug creation',1,'#dadada');
INSERT INTO "severity" VALUES (2,'Idea','Ideas for further development',2,'#dad0d0');
INSERT INTO "severity" VALUES (3,'Feature Request','Requests for specific features',3,'#dacaca');
INSERT INTO "severity" VALUES (4,'Annoyance','Cosmetic problems or bugs not affecting performance',4,'#dac0c0');
INSERT INTO "severity" VALUES (5,'Content','Non-functional related bugs, such as text content',5,'#dababa');
INSERT INTO "severity" VALUES (6,'Significant','A bug affecting the intended performance of the product',6,'#dab0b0');
INSERT INTO "severity" VALUES (7,'Critical','A bug severe enough to prevent the release of the product',7,'#daaaaa');
--
-- Table structure for table 'status'
--
CREATE TABLE "status" (
"status_id" INT4 NOT NULL DEFAULT '0',
"status_name" varchar(30) NOT NULL DEFAULT '',
"status_desc" "text" NOT NULL,
"sort_order" INT2 NOT NULL DEFAULT '0',
PRIMARY KEY (status_id)
);
--
-- Dumping data for table 'status'
--
INSERT INTO "status" VALUES (1,'Unconfirmed','Reported but not confirmed',1);
INSERT INTO "status" VALUES (2,'New','A new bug',2);
INSERT INTO "status" VALUES (3,'Assigned','Assigned to a developer',3);
INSERT INTO "status" VALUES (4,'Reopened','Closed but opened again for further inspection',4);
INSERT INTO "status" VALUES (5,'Resolved','Set by engineer with a resolution',5);
INSERT INTO "status" VALUES (6,'Verified','The resolution is confirmed by the reporter',6);
INSERT INTO "status" VALUES (7,'Closed','The bug is officially squashed (QA)',7);
--
-- Table structure for table 'user'
--
CREATE TABLE "user" (
"user_id" INT4 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" INT2 NOT NULL DEFAULT '1',
"bug_list_fields" char(255) NOT NULL DEFAULT '',
"created_by" INT4 NOT NULL DEFAULT '0',
"created_date" INT8 NOT NULL DEFAULT '0',
"last_modified_by" INT4 NOT NULL DEFAULT '0',
"last_modified_date" INT8 NOT NULL DEFAULT '0',
PRIMARY KEY (user_id)
);
--
-- Dumping data for table 'user'
--
INSERT INTO "user" VALUES (1,'System','Admin','ro...@yo...','somepassword',15,'',0,998378431,0,998378431);
--
-- Table structure for table 'version'
--
CREATE TABLE "project" (
"version_id" INT4 NOT NULL DEFAULT '0',
"project_id" INT4 NOT NULL DEFAULT '0',
"version_name" char(10) NOT NULL DEFAULT '',
"active" INT2 NOT NULL DEFAULT '1',
"created_by" INT4 NOT NULL DEFAULT '0',
"created_date" INT8 NOT NULL DEFAULT '0',
"last_modified_by" INT4 NOT NULL DEFAULT '0',
"last_modified_date" INT8 NOT NULL DEFAULT '0',
PRIMARY KEY (version_id)
);
--
-- Indexes for table ACTIVE_SESSIONS
--
CREATE INDEX changed_active_sessions_index ON "active_sessions" ("changed");
COMMIT;
|
|
From: Benjamin C. <bc...@us...> - 2001-08-23 02:28:55
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv13851
Modified Files:
config.php configure
Log Message:
Get configure and config.php working together
Index: config.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- config.php 2001/08/23 02:10:18 1.3
+++ config.php 2001/08/23 02:28:52 1.4
@@ -25,15 +25,15 @@
define ('INSTALLPATH', '/home/bcurtis/public_html/phpbt');
define ('INSTALLURL', 'http://localhost/~bcurtis/phpbt');
-define ('PHPLIBPATH', ''); // If it's not in the include path
-define ('JPGRAPH_PATH', ''); // If it's not in the include path
+define ('PHPLIBPATH', ''); // If not in the include path
+define ('JPGRAPH_PATH', ''); // If not in the include path
//Database Config
define ('DB_TYPE', 'mysql'); //using PHPlib file naming
define ('DB_HOST', 'localhost');
define ('DB_DATABASE', 'BugTracker');
define ('DB_USER', 'root');
-define ('DB_PASSWORD','');
+define ('DB_PASSWORD', '');
define ('ADMINEMAIL', 'ph...@be...');
define ('ENCRYPTPASS', 0); // Whether to store passwords encrypted
Index: configure
===================================================================
RCS file: /cvsroot/phpbt/phpbt/configure,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- configure 2001/08/16 19:21:02 1.7
+++ configure 2001/08/23 02:28:52 1.8
@@ -1,4 +1,7 @@
#!/bin/bash
+# Script to edit configuration settings
+# $Id$
+
DIALOG=${DIALOG=dialog}
tempfile=`tempfile 2>/dev/null` || tempfile=/tmp/test$$
trap "rm -f $tempfile" 0 1 2 5 15
@@ -19,6 +22,7 @@
USE_JPGRAPH=0
MASK_EMAIL=0
HIDE_EMAIL=1
+SEV_COLOR=1
administrivia() {
$DIALOG --backtitle "phpBT Configuration" \
@@ -124,20 +128,27 @@
else
OLD_HIDE_EMAIL=off
fi
+ if [ $SEV_COLOR -eq 1 ]; then
+ OLD_SEV_COLOR=on
+ else
+ OLD_SEV_COLOR=off
+ fi
NEW_ENCRYPTPASS=0
NEW_USE_JPGRAPH=0
NEW_MASK_EMAIL=0
NEW_HIDE_EMAIL=0
+ NEW_SEV_COLOR=0
$DIALOG --backtitle "phpBT Configuration" \
--title "Optional Features" \
--separate-output \
- --checklist "Choose the features below you would like to enable" 12 72 5 \
+ --checklist "Choose the features below you would like to enable" 18 78 8 \
"ENCRYPTPASS" "Store passwords encrypted in the database" $OLD_ENCRYPTPASS \
"USE_JPGRAPH" "Use the JP Graph class for charting some reports" $OLD_USE_JPGRAPH \
"MASK_EMAIL" "Replace @ with at and . with dot when showing emails" $OLD_MASK_EMAIL \
"HIDE_EMAIL" "Completely hide emails when not logged in" $OLD_HIDE_EMAIL \
+ "SEV_COLOR" "Color rows in bug list according to severity" $OLD_SEV_COLOR \
2> $tempfile
retval=$?
@@ -155,6 +166,8 @@
NEW_MASK_EMAIL=1;;
HIDE_EMAIL)
NEW_HIDE_EMAIL=1;;
+ SEV_COLOR)
+ NEW_SEV_COLOR=1;;
esac
done
@@ -162,6 +175,7 @@
USE_JPGRAPH=${NEW_USE_JPGRAPH:-0}
MASK_EMAIL=${NEW_MASK_EMAIL:-0}
HIDE_EMAIL=${NEW_HIDE_EMAIL:-0}
+ SEV_COLOR=${NEW_SEV_COLOR:-0}
fi
if [ $USE_JPGRAPH -eq 1 ]; then
@@ -201,21 +215,21 @@
change_features
;;
Save)
- mv include.php include.php.bak
+ mv config.php config.php.bak
echo "/ENCRYPTPASS/s/[[:digit:]]/$ENCRYPTPASS/" > $tempfile
echo "/USE_JPGRAPH/s/[[:digit:]]/$USE_JPGRAPH/" >> $tempfile
echo "/MASK_EMAIL/s/[[:digit:]]/$MASK_EMAIL/" >> $tempfile
echo "/HIDE_EMAIL/s/[[:digit:]]/$HIDE_EMAIL/" >> $tempfile
- echo "/ADMINEMAIL/s|,'.*'|,'$ADMINEMAIL'|" >> $tempfile
- echo "/INSTALLPATH/s|,'.*'|,'$INSTALLPATH'|" >> $tempfile
+ echo "/ADMINEMAIL/s|, '.*'|, '$ADMINEMAIL'|" >> $tempfile
+ echo "/INSTALLPATH/s|, '.*'|, '$INSTALLPATH'|" >> $tempfile
echo "/ATTACHMENT_PATH/s|, '.*'|, '$ATTACHMENT_PATH'|" >> $tempfile
- echo "/INSTALLURL/s|,'.*'|,'$INSTALLURL'|" >> $tempfile
- echo "/PHPLIBPATH/s|,'.*'|,'$PHPLIBPATH'|" >> $tempfile
- echo "/JPGRAPH_PATH/s|,'.*'|,'$JPGRAPH_PATH'|" >> $tempfile
- echo "/var \$Host/s|'.*'|'$DB_HOST'|" >> $tempfile
- echo "/var \$User/s|'.*'|'$DB_USER'|" >> $tempfile
- echo "/var \$Password/s|'.*'|'$DB_PASS'|" >> $tempfile
- sed -f $tempfile include.php.bak > include.php
+ echo "/INSTALLURL/s|, '.*'|, '$INSTALLURL'|" >> $tempfile
+ echo "/PHPLIBPATH/s|, '.*'|, '$PHPLIBPATH'|" >> $tempfile
+ echo "/JPGRAPH_PATH/s|, '.*'|, '$JPGRAPH_PATH'|" >> $tempfile
+ echo "/DB_HOST/s|, '.*'|, '$DB_HOST'|" >> $tempfile
+ echo "/DB_USER/s|, '.*'|, '$DB_USER'|" >> $tempfile
+ echo "/DB_PASSWORD/s|, '.*'|, '$DB_PASS'|" >> $tempfile
+ sed -f $tempfile config.php.bak > config.php
$DIALOG --backtitle "phpBT Configuration" \
--infobox "Your changes have been saved" 5 36
exit
|
|
From: Benjamin C. <bc...@us...> - 2001-08-23 02:10:21
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv11356
Modified Files:
config.php
Log Message:
Let's make this a little more consistent in formatting and put the stuff more likely to be changed nearer to the top
Index: config.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/config.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- config.php 2001/08/23 01:20:49 1.2
+++ config.php 2001/08/23 02:10:18 1.3
@@ -22,38 +22,36 @@
// ------------------------------------------------------------------------
// $Id$
-define ('INSTALLPATH','/home/bcurtis/public_html/phpbt');
-define ('INSTALLURL','http://localhost/~bcurtis/phpbt');
+define ('INSTALLPATH', '/home/bcurtis/public_html/phpbt');
+define ('INSTALLURL', 'http://localhost/~bcurtis/phpbt');
-
-define ('PHPLIBPATH',''); // If it's not in the include path
+define ('PHPLIBPATH', ''); // If it's not in the include path
define ('JPGRAPH_PATH', ''); // If it's not in the include path
-define ('ONEDAY',86400);
-define ('DATEFORMAT','m-d-Y');
-define ('TIMEFORMAT','g:i A');
-define ('ADMINEMAIL','ph...@be...');
-define ('ENCRYPTPASS',0); // Whether to store passwords encrypted
-define ('THEME','default/'); // Which set of templates to use
-define ('USE_JPGRAPH',0); // Whether to show images or not
+//Database Config
+define ('DB_TYPE', 'mysql'); //using PHPlib file naming
+define ('DB_HOST', 'localhost');
+define ('DB_DATABASE', 'BugTracker');
+define ('DB_USER', 'root');
+define ('DB_PASSWORD','');
+define ('ADMINEMAIL', 'ph...@be...');
+define ('ENCRYPTPASS', 0); // Whether to store passwords encrypted
+define ('THEME', 'default/'); // Which set of templates to use
+define ('USE_JPGRAPH', 0); // Whether to show images or not
define ('MASK_EMAIL', 1); // Should email addresses be plainly visible?
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);
+
// Sub-dir of the INSTALLPATH - Needs to be writeable by the web process
define ('ATTACHMENT_PATH', 'attachments');
// Maximum size (in bytes) of an attachment
// This will not override the settings in php.ini if php.ini has a lower limit
define ('ATTACHMENT_MAX_SIZE', 2097152);
-
-
-//Database Config
-define ('DB_TYPE', 'mysql'); //using PHPlib file naming
-define ('DB_HOST', 'localhost');
-define ('DB_DATABASE', 'BugTracker');
-define ('DB_USER', 'root');
-define ('DB_PASSWORD','');
+define ('ONEDAY', 86400);
+define ('DATEFORMAT', 'm-d-Y');
+define ('TIMEFORMAT', 'g:i A');
require PHPLIBPATH.'db_'.DB_TYPE.'.inc';
require PHPLIBPATH.'ct_sql.inc';
|
|
From: Benjamin C. <bc...@us...> - 2001-08-23 02:03:20
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv10149
Modified Files:
attachment.php bug.php
Log Message:
Bug stompin'
Index: attachment.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/attachment.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- attachment.php 2001/08/18 03:12:27 1.5
+++ attachment.php 2001/08/23 02:03:16 1.6
@@ -20,6 +20,7 @@
// along with phpBugTracker; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// ------------------------------------------------------------------------
+// $Id$
include 'include.php';
@@ -77,7 +78,7 @@
}
// Check for a previously-uploaded attachment with the same name, bug, and project
- $q->query("select a.bug_id, project_id from attachment a, Bug b where file_name = '{$HTTP_POST_FILES['attachment']['name']}' and a.bug_id = b.bug_id");
+ $q->query("select a.bug_id, project_id from attachment a, bug b where file_name = '{$HTTP_POST_FILES['attachment']['name']}' and a.bug_id = b.bug_id");
while ($ainfo = $q->grab()) {
if ($bugid == $ainfo['bug_id'] && $projectid == $ainfo['project_id']) {
show_attachment_form($bugid, $STRING['dupe_attachment']);
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- bug.php 2001/08/19 03:28:31 1.28
+++ bug.php 2001/08/23 02:03:16 1.29
@@ -20,6 +20,7 @@
// along with phpBugTracker; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// ------------------------------------------------------------------------
+// $Id$
include 'include.php';
@@ -344,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 bug_id, title, reporter.email as reporter, owner.email as owner, b.project_id, b.version_id, b.severity_id, b.created_date, b.last_modified_date, status_name as status, b.priority, b.description, resolution_name as resolution, url, b.component_id, b.os_id 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 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")) {
show_text($STRING['bugbadnum'],true);
return;
}
@@ -367,8 +368,8 @@
'urllabel' => $row['url'] ? "<a href='{$row['url']}'>URL</a>" : 'URL',
'severity' => build_select('severity',$row['severity_id']),
'priority' => build_select('priority',$row['priority']),
- 'status' => $row['status_id'],
- 'resolution' => $row['resolution_id'],
+ 'status' => $row['status_name'],
+ 'resolution' => $row['resolution_name'],
'owner' => maskemail($row['owner']),
'reporter' => maskemail($row['reporter']),
'createddate' => date(DATEFORMAT,$row['created_date']),
@@ -380,11 +381,11 @@
'component' => build_select('component',$row['component_id'],$row['project_id']),
'os' => build_select('os',$row['os_id']),
'browserstring' => $row['browser_string'],
- 'bugresolution' => build_select('resolution_id'),
+ 'bugresolution' => build_select('resolution'),
'submit' => $u == 'nobody' ? $STRING['logintomodify'] :
'<input type="submit" value="Submit">'
));
- switch($row['Status']) {
+ switch($row['status_name']) {
case 'Unconfirmed' :
case 'New' :
case 'Reopened' :
|
|
From: Benjamin C. <bc...@us...> - 2001-08-23 01:40:40
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv6595/admin
Modified Files:
project.php
Log Message:
Index: project.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/project.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- project.php 2001/08/23 01:39:03 1.12
+++ project.php 2001/08/23 01:40:36 1.13
@@ -22,7 +22,6 @@
// ------------------------------------------------------------------------
// $Id$
-#ini_set('include_path', '../'.ini_get('include_path'));
define('INCLUDE_PATH', '../');
include INCLUDE_PATH.'include.php';
|
|
From: Benjamin C. <bc...@us...> - 2001-08-23 01:39:44
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv6395
Modified Files:
include.php
Log Message:
Allow the admin stuff to see config.php
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- include.php 2001/08/23 01:20:49 1.38
+++ include.php 2001/08/23 01:39:40 1.39
@@ -22,7 +22,11 @@
// ------------------------------------------------------------------------
// $Id$
-require "config.php";
+if (defined("INCLUDE_PATH")) {
+ require INCLUDE_PATH."config.php";
+} else {
+ require "config.php";
+}
// Edit this class with your database information
class dbclass extends DB_Sql {
|
|
From: Benjamin C. <bc...@us...> - 2001-08-23 01:39:06
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv6248
Modified Files:
component.php os.php project.php resolution.php severity.php
status.php user.php version.php
Log Message:
Hmm... I think I like it better this way -- still, a cleaner way would be nice
Index: component.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/component.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- component.php 2001/08/23 01:32:05 1.9
+++ component.php 2001/08/23 01:39:03 1.10
@@ -22,8 +22,8 @@
// ------------------------------------------------------------------------
// $Id$
-ini_set('include_path', '../'.ini_get('include_path'));
-include 'include.php';
+define('INCLUDE_PATH', '../');
+include INCLUDE_PATH.'include.php';
function do_form($componentid = 0) {
global $q, $me, $projectid, $name, $description, $owner, $active, $u, $STRING;
Index: os.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/os.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- os.php 2001/08/23 01:32:05 1.9
+++ os.php 2001/08/23 01:39:03 1.10
@@ -22,8 +22,8 @@
// ------------------------------------------------------------------------
// $Id$
-ini_set('include_path', '../'.ini_get('include_path'));
-include 'include.php';
+define('INCLUDE_PATH', '../');
+include INCLUDE_PATH.'include.php';
function do_form($osid = 0) {
global $q, $me, $fname, $fregex, $fsortorder, $STRING;
Index: project.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/project.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- project.php 2001/08/23 01:32:05 1.11
+++ project.php 2001/08/23 01:39:03 1.12
@@ -22,8 +22,9 @@
// ------------------------------------------------------------------------
// $Id$
-ini_set('include_path', '../'.ini_get('include_path'));
-include 'include.php';
+#ini_set('include_path', '../'.ini_get('include_path'));
+define('INCLUDE_PATH', '../');
+include INCLUDE_PATH.'include.php';
function do_form($projectid = 0) {
global $q, $me, $name, $description, $active, $version, $u, $STRING, $now;
Index: resolution.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/resolution.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- resolution.php 2001/08/23 01:32:05 1.10
+++ resolution.php 2001/08/23 01:39:03 1.11
@@ -22,8 +22,8 @@
// ------------------------------------------------------------------------
// $Id$
-ini_set('include_path', '../'.ini_get('include_path'));
-include 'include.php';
+define('INCLUDE_PATH', '../');
+include INCLUDE_PATH.'include.php';
function do_form($resolutionid = 0) {
global $q, $me, $fname, $fdescription, $fsortorder, $STRING;
Index: severity.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/severity.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- severity.php 2001/08/23 01:32:05 1.3
+++ severity.php 2001/08/23 01:39:03 1.4
@@ -22,8 +22,8 @@
// ------------------------------------------------------------------------
// $Id$
-ini_set('include_path', '../'.ini_get('include_path'));
-include 'include.php';
+define('INCLUDE_PATH', '../');
+include INCLUDE_PATH.'include.php';
function do_form($severityid = 0) {
global $q, $me, $fname, $fdescription, $fsortorder, $fcolor, $STRING;
Index: status.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/status.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- status.php 2001/08/23 01:32:05 1.10
+++ status.php 2001/08/23 01:39:03 1.11
@@ -22,8 +22,8 @@
// ------------------------------------------------------------------------
// $Id$
-ini_set('include_path', '../'.ini_get('include_path'));
-include 'include.php';
+define('INCLUDE_PATH', '../');
+include INCLUDE_PATH.'include.php';
function do_form($statusid = 0) {
global $q, $me, $fname, $fdescription, $fsortorder, $STRING;
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- user.php 2001/08/23 01:32:05 1.15
+++ user.php 2001/08/23 01:39:03 1.16
@@ -22,8 +22,8 @@
// ------------------------------------------------------------------------
// $Id$
-ini_set('include_path', '../'.ini_get('include_path'));
-include 'include.php';
+define('INCLUDE_PATH', '../');
+include INCLUDE_PATH.'include.php';
function do_form($userid = 0) {
global $q, $me, $ffirstname, $flastname, $femail, $fpassword, $usertype, $STRING, $now;
Index: version.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/version.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- version.php 2001/08/23 01:32:05 1.10
+++ version.php 2001/08/23 01:39:03 1.11
@@ -22,8 +22,8 @@
// ------------------------------------------------------------------------
// $Id$
-ini_set('include_path', '../'.ini_get('include_path'));
-include 'include.php';
+define('INCLUDE_PATH', '../');
+include INCLUDE_PATH.'include.php';
function do_form($versionid = 0) {
global $q, $me, $projectid, $version, $active, $STRING, $now, $u;
|
|
From: Benjamin C. <bc...@us...> - 2001-08-23 01:32:08
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv5046
Modified Files:
component.php os.php project.php resolution.php severity.php
status.php user.php version.php
Log Message:
With the new inclusion of config.php in .. we need a way to get to it. If there is a better way than this to do it, let me know
Index: component.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/component.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- component.php 2001/08/17 14:39:47 1.8
+++ component.php 2001/08/23 01:32:05 1.9
@@ -20,8 +20,10 @@
// 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';
+ini_set('include_path', '../'.ini_get('include_path'));
+include 'include.php';
function do_form($componentid = 0) {
global $q, $me, $projectid, $name, $description, $owner, $active, $u, $STRING;
Index: os.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/os.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- os.php 2001/08/17 14:39:47 1.8
+++ os.php 2001/08/23 01:32:05 1.9
@@ -20,8 +20,10 @@
// 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';
+ini_set('include_path', '../'.ini_get('include_path'));
+include 'include.php';
function do_form($osid = 0) {
global $q, $me, $fname, $fregex, $fsortorder, $STRING;
@@ -125,4 +127,4 @@
page_close();
-?>
\ No newline at end of file
+?>
Index: project.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/project.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- project.php 2001/08/17 14:39:47 1.10
+++ project.php 2001/08/23 01:32:05 1.11
@@ -20,8 +20,10 @@
// 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';
+ini_set('include_path', '../'.ini_get('include_path'));
+include 'include.php';
function do_form($projectid = 0) {
global $q, $me, $name, $description, $active, $version, $u, $STRING, $now;
@@ -208,4 +210,4 @@
page_close();
-?>
\ No newline at end of file
+?>
Index: resolution.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/resolution.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- resolution.php 2001/08/17 14:39:47 1.9
+++ resolution.php 2001/08/23 01:32:05 1.10
@@ -20,8 +20,10 @@
// 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';
+ini_set('include_path', '../'.ini_get('include_path'));
+include 'include.php';
function do_form($resolutionid = 0) {
global $q, $me, $fname, $fdescription, $fsortorder, $STRING;
@@ -126,4 +128,4 @@
page_close();
-?>
\ No newline at end of file
+?>
Index: severity.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/severity.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- severity.php 2001/08/18 20:12:39 1.2
+++ severity.php 2001/08/23 01:32:05 1.3
@@ -20,8 +20,10 @@
// 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';
+ini_set('include_path', '../'.ini_get('include_path'));
+include 'include.php';
function do_form($severityid = 0) {
global $q, $me, $fname, $fdescription, $fsortorder, $fcolor, $STRING;
Index: status.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/status.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- status.php 2001/08/17 14:39:47 1.9
+++ status.php 2001/08/23 01:32:05 1.10
@@ -20,8 +20,10 @@
// 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';
+ini_set('include_path', '../'.ini_get('include_path'));
+include 'include.php';
function do_form($statusid = 0) {
global $q, $me, $fname, $fdescription, $fsortorder, $STRING;
@@ -126,4 +128,4 @@
page_close();
-?>
\ No newline at end of file
+?>
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/user.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- user.php 2001/08/17 14:39:47 1.14
+++ user.php 2001/08/23 01:32:05 1.15
@@ -20,8 +20,10 @@
// 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';
+ini_set('include_path', '../'.ini_get('include_path'));
+include 'include.php';
function do_form($userid = 0) {
global $q, $me, $ffirstname, $flastname, $femail, $fpassword, $usertype, $STRING, $now;
@@ -148,4 +150,4 @@
page_close();
-?>
\ No newline at end of file
+?>
Index: version.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/version.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- version.php 2001/08/17 14:39:47 1.9
+++ version.php 2001/08/23 01:32:05 1.10
@@ -20,8 +20,10 @@
// 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';
+ini_set('include_path', '../'.ini_get('include_path'));
+include 'include.php';
function do_form($versionid = 0) {
global $q, $me, $projectid, $version, $active, $STRING, $now, $u;
@@ -80,4 +82,4 @@
page_close();
-?>
\ No newline at end of file
+?>
|
|
From: Benjamin C. <bc...@us...> - 2001-08-23 01:20:53
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv2205 Modified Files: config.php include.php Log Message: Miscellany Index: config.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/config.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- config.php 2001/08/22 16:34:48 1.1 +++ config.php 2001/08/23 01:20:49 1.2 @@ -1,6 +1,6 @@ <?php -// include.php - Set up global variables and functions +// config.php - Set up configuration options // ------------------------------------------------------------------------ // Copyright (c) 2001 The phpBugTracker Group // ------------------------------------------------------------------------ @@ -66,7 +66,4 @@ // Localization - include the file with the desired language include INSTALLPATH.'/languages/en.php'; - - - -?> \ No newline at end of file +?> Index: include.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/include.php,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- include.php 2001/08/22 16:34:20 1.37 +++ include.php 2001/08/23 01:20:49 1.38 @@ -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$ require "config.php"; @@ -443,4 +444,4 @@ } } -?> \ No newline at end of file +?> |
|
From: Benjamin C. <bc...@us...> - 2001-08-22 22:34:55
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv1607
Modified Files:
INSTALL
Log Message:
Add in comments on INSTALLPATH and INSTALLURL editing
Index: INSTALL
===================================================================
RCS file: /cvsroot/phpbt/phpbt/INSTALL,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- INSTALL 2001/08/14 12:51:19 1.5
+++ INSTALL 2001/08/22 22:34:52 1.6
@@ -12,11 +12,13 @@
-- or --
5. Edit include.php as follows:
- a. Change the ADMINEMAIL constant to what you want
- b. Change the database login info in class dbclass.
- c. Change the ENCRYPTPASS constant to 1 if you want to have passwords stored
+ a. Change the INSTALLPATH and INSTALLURL variables to point the right
+ locations.
+ b. Change the ADMINEMAIL constant to what you want
+ c. Change the database login info in class dbclass.
+ d. Change the ENCRYPTPASS constant to 1 if you want to have passwords stored
encrypted in the database.
- d. Change the USE_JPGRAPH constant to 1 if you want to use the jpgraph class
+ e. Change the USE_JPGRAPH constant to 1 if you want to use the jpgraph class
(http://www.aditus.nu/jpgraph/) to display the bug summary info. If you
enable this you'll also need to edit the JPGRAPH_PATH constant, and
you'll need to edit the jpgraph.php file from the jpgraph disribution.
|
|
From: Javier S. <ja...@us...> - 2001-08-22 16:34:51
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv4828
Added Files:
config.php
Log Message:
Configuration File
--- NEW FILE: config.php ---
<?php
// include.php - Set up global variables and functions
// ------------------------------------------------------------------------
// Copyright (c) 2001 The phpBugTracker Group
// ------------------------------------------------------------------------
// This file is part of phpBugTracker
//
// phpBugTracker is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// phpBugTracker is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with phpBugTracker; if not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// ------------------------------------------------------------------------
// $Id: config.php,v 1.1 2001/08/22 16:34:48 javyer Exp $
define ('INSTALLPATH','/home/bcurtis/public_html/phpbt');
define ('INSTALLURL','http://localhost/~bcurtis/phpbt');
define ('PHPLIBPATH',''); // If it's not in the include path
define ('JPGRAPH_PATH', ''); // If it's not in the include path
define ('ONEDAY',86400);
define ('DATEFORMAT','m-d-Y');
define ('TIMEFORMAT','g:i A');
define ('ADMINEMAIL','ph...@be...');
define ('ENCRYPTPASS',0); // Whether to store passwords encrypted
define ('THEME','default/'); // Which set of templates to use
define ('USE_JPGRAPH',0); // Whether to show images or not
define ('MASK_EMAIL', 1); // Should email addresses be plainly visible?
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);
// Sub-dir of the INSTALLPATH - Needs to be writeable by the web process
define ('ATTACHMENT_PATH', 'attachments');
// Maximum size (in bytes) of an attachment
// This will not override the settings in php.ini if php.ini has a lower limit
define ('ATTACHMENT_MAX_SIZE', 2097152);
//Database Config
define ('DB_TYPE', 'mysql'); //using PHPlib file naming
define ('DB_HOST', 'localhost');
define ('DB_DATABASE', 'BugTracker');
define ('DB_USER', 'root');
define ('DB_PASSWORD','');
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';
// Localization - include the file with the desired language
include INSTALLPATH.'/languages/en.php';
?>
|
|
From: Javier S. <ja...@us...> - 2001-08-22 16:34:23
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv4704
Modified Files:
include.php
Log Message:
splitting configuration stuff to config.php
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- include.php 2001/08/21 16:50:27 1.36
+++ include.php 2001/08/22 16:34:20 1.37
@@ -10,68 +10,37 @@
// 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.
// ------------------------------------------------------------------------
-define ('INSTALLPATH','/home/bcurtis/public_html/phpbt');
-define ('INSTALLURL','http://localhost/~bcurtis/phpbt');
-// Location of phplib -- only necessary if you can't define your include path
-define ('PHPLIBPATH','');
-define ('ONEDAY',86400);
-define ('DATEFORMAT','m-d-Y');
-define ('TIMEFORMAT','g:i A');
-define ('ADMINEMAIL','ph...@be...');
-define ('ENCRYPTPASS',0); // Whether to store passwords encrypted
-define ('THEME','default/'); // Which set of templates to use
-define ('USE_JPGRAPH',0); // Whether to show images or not
-define ('JPGRAPH_PATH', '/home/bcurtis/public_html/jp/'); // If it's not in the include path
-define ('MASK_EMAIL', 1); // Should email addresses be plainly visible?
-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);
-// Sub-dir of the INSTALLPATH - Needs to be writeable by the web process
-define ('ATTACHMENT_PATH', 'attachments');
-// Maximum size (in bytes) of an attachment
-// This will not override the settings in php.ini if php.ini has a lower limit
-define ('ATTACHMENT_MAX_SIZE', 2097152);
-
-require PHPLIBPATH.'db_mysql.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 "config.php";
-// Localization - include the file with the desired language
-include INSTALLPATH.'/languages/en.php';
-
// Edit this class with your database information
class dbclass extends DB_Sql {
- var $classname = 'dbclass';
- var $Host = 'localhost';
- var $Database = 'BugTracker';
- var $User = 'root';
- var $Password = '';
-
- function grab($q_string = '') {
- if ($q_string) $this->query($q_string);
- $this->next_record();
- return $this->Record;
- }
-
- function grab_field($q_string = '') {
- list($retval) = $this->grab($q_string);
- return $retval;
- }
+ var $classname = 'dbclass';
+ var $Host = DB_HOST;
+ var $Database = DB_DATABASE;
+ var $User = DB_USER;
+ var $Password = DB_PASSWORD;
+
+ function grab($q_string = '') {
+ if ($q_string) $this->query($q_string);
+ $this->next_record();
+ return $this->Record;
+ }
+
+ function grab_field($q_string = '') {
+ list($retval) = $this->grab($q_string);
+ return $retval;
+ }
}
$q = new dbclass;
@@ -84,394 +53,394 @@
$_pv = $HTTP_POST_VARS;
$select['authlevels'] = array(
- 0 => 'Inactive',
- 1 => 'User',
- 3 => 'Developer',
- 7 => 'Manager',
- 15 => 'Administrator'
- );
+ 0 => 'Inactive',
+ 1 => 'User',
+ 3 => 'Developer',
+ 7 => 'Manager',
+ 15 => 'Administrator'
+ );
$all_db_fields = array(
- 'bug_id' => 'ID',
- 'title' => 'Title',
- 'description' => 'Description',
- 'url' => 'URL',
- 'severity_name' => 'Severity',
- 'priority' => 'Priority',
- 'status_name' => 'Status',
- 'resolution_name' => 'Resolution',
- 'reporter' => 'Reporter',
- 'owner' => 'Owner',
- 'created_date' => 'Created Date',
- 'lastmodifier' => 'Last Modified By',
- 'last_modified_date' => 'Last Modified Date',
- 'project_name' => 'Project',
- 'version_name' => 'Version',
- 'component_name' => 'Component',
- 'os_name' => 'OS',
- 'browser_string' => 'Browser',
- 'close_date' => 'Closed Date'
- );
-
-$default_db_fields = array('bug_id', 'title', 'reporter', 'owner',
- 'severity_name', 'priority', 'status_name', 'resolution_name');
-
+ 'bug_id' => 'ID',
+ 'title' => 'Title',
+ 'description' => 'Description',
+ 'url' => 'URL',
+ 'severity_name' => 'Severity',
+ 'priority' => 'Priority',
+ 'status_name' => 'Status',
+ 'resolution_name' => 'Resolution',
+ 'reporter' => 'Reporter',
+ 'owner' => 'Owner',
+ 'created_date' => 'Created Date',
+ 'lastmodifier' => 'Last Modified By',
+ 'last_modified_date' => 'Last Modified Date',
+ 'project_name' => 'Project',
+ 'version_name' => 'Version',
+ 'component_name' => 'Component',
+ 'os_name' => 'OS',
+ 'browser_string' => 'Browser',
+ 'close_date' => 'Closed Date'
+ );
+
+$default_db_fields = array('bug_id', 'title', 'reporter', 'owner',
+ 'severity_name', 'priority', 'status_name', 'resolution_name');
+
class sqlclass extends CT_Sql {
- var $database_class = 'dbclass';
- var $database_table = 'active_sessions';
+ var $database_class = 'dbclass';
+ var $database_table = 'active_sessions';
}
class usess extends Session {
- var $classname = 'usess';
- var $magic = 'gerdisbad';
- var $mode = 'cookie';
- #var $fallback_mode = 'get';
- var $lifetime = 0;
- var $that_class = 'sqlclass';
- var $allowcache = 'jl';
+ var $classname = 'usess';
+ var $magic = 'gerdisbad';
+ var $mode = 'cookie';
+ #var $fallback_mode = 'get';
+ var $lifetime = 0;
+ var $that_class = 'sqlclass';
+ var $allowcache = 'jl';
}
class uauth extends Auth {
- var $classname = 'uauth';
- var $lifetime = 0;
- var $magic = 'looneyville';
- var $nobody = true;
-
- function auth_loginform() {
- global $sess;
-
- include 'templates/'.THEME.'login.html';
-
- }
-
- function auth_validatelogin() {
- global $username, $password, $q, $select, $emailpass, $emailsuccess, $STRING;
-
- if (!$username) return 'nobody';
- $this->auth['uname'] = $username;
- if (ENCRYPTPASS) {
- $password = md5($password);
- }
- $u = $q->grab("select * from user where email = '$username' and password = '$password' and user_level > 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']);
- return $u['user_id'];
- }
- }
-
- function unauth($nobody = false) {
- Auth::unauth($nobody);
- $this->auth['db_fields'] = '';
- }
+ var $classname = 'uauth';
+ var $lifetime = 0;
+ var $magic = 'looneyville';
+ var $nobody = true;
+
+ function auth_loginform() {
+ global $sess;
+
+ include 'templates/'.THEME.'login.html';
+
+ }
+
+ function auth_validatelogin() {
+ global $username, $password, $q, $select, $emailpass, $emailsuccess, $STRING;
+
+ if (!$username) return 'nobody';
+ $this->auth['uname'] = $username;
+ if (ENCRYPTPASS) {
+ $password = md5($password);
+ }
+ $u = $q->grab("select * from user where email = '$username' and password = '$password' and user_level > 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']);
+ return $u['user_id'];
+ }
+ }
+
+ function unauth($nobody = false) {
+ Auth::unauth($nobody);
+ $this->auth['db_fields'] = '';
+ }
}
class uperm extends Perm {
- var $classname = 'uperm';
- var $permissions = array(
- 'Inactive' => 0,
- 'User' => 1,
- 'Developer' => 3,
- 'Manager' => 7,
- 'Administrator' => 15,
- );
-
- function perm_invalid() {
- global $t, $auth;
- $t->set_file('content','badperm.html');
- $t->pparse('main',array('content','wrap','main'));
- }
+ var $classname = 'uperm';
+ var $permissions = array(
+ 'Inactive' => 0,
+ 'User' => 1,
+ 'Developer' => 3,
+ 'Manager' => 7,
+ 'Administrator' => 15,
+ );
+
+ function perm_invalid() {
+ global $t, $auth;
+ $t->set_file('content','badperm.html');
+ $t->pparse('main',array('content','wrap','main'));
+ }
}
class templateclass extends Template {
- function pparse($target, $handle, $append = false) {
- global $auth, $perm, $q;
-
- $u = $auth->auth['uid'];
- $this->set_block('wrap', 'logoutblock', 'loblock');
- $this->set_block('wrap', 'loginblock', 'liblock');
- $this->set_block('wrap', 'adminnavblock', 'anblock');
- 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 bug b left join 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 bug b left join status s using(status_id) where created_by = $u");
- $this->set_var(array(
- 'loggedinas' => $auth->auth['email'],
- 'liblock' => '',
- 'owner_open' => $owner_open,
- 'owner_closed' => $owner_closed,
- 'reporter_open' => $reporter_open,
- 'reporter_closed' => $reporter_closed
- ));
- $this->parse('loblock', 'logoutblock', true);
- } else {
- $this->set_var(array(
- 'loggedinas' => '',
- 'loblock' => ''
- ));
- $this->parse('liblock', 'loginblock', true);
- }
- if (isset($perm) && $perm->have_perm('Administrator')) {
- $this->parse('anblock', 'adminnavblock', true);
- } else {
- $this->set_var('anblock', '');
- }
- print $this->finish($this->parse($target, $handle, $append));
- return false;
- }
+ function pparse($target, $handle, $append = false) {
+ global $auth, $perm, $q;
+
+ $u = $auth->auth['uid'];
+ $this->set_block('wrap', 'logoutblock', 'loblock');
+ $this->set_block('wrap', 'loginblock', 'liblock');
+ $this->set_block('wrap', 'adminnavblock', 'anblock');
+ 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 bug b left join 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 bug b left join status s using(status_id) where created_by = $u");
+ $this->set_var(array(
+ 'loggedinas' => $auth->auth['email'],
+ 'liblock' => '',
+ 'owner_open' => $owner_open,
+ 'owner_closed' => $owner_closed,
+ 'reporter_open' => $reporter_open,
+ 'reporter_closed' => $reporter_closed
+ ));
+ $this->parse('loblock', 'logoutblock', true);
+ } else {
+ $this->set_var(array(
+ 'loggedinas' => '',
+ 'loblock' => ''
+ ));
+ $this->parse('liblock', 'loginblock', true);
+ }
+ if (isset($perm) && $perm->have_perm('Administrator')) {
+ $this->parse('anblock', 'adminnavblock', true);
+ } else {
+ $this->set_var('anblock', '');
+ }
+ print $this->finish($this->parse($target, $handle, $append));
+ return false;
+ }
}
$t = new templateclass('templates/'.THEME,'keep');
$t->set_var(array(
- 'TITLE' => '',
- 'me' => $me,
- 'me2' => $me2,
- 'error' => '',
- 'cssfile' => $cssfile,
- 'loginerror' => ''));
-
-// End classes -- Begin helper functions
-
+ 'TITLE' => '',
+ 'me' => $me,
+ 'me2' => $me2,
+ 'error' => '',
+ 'cssfile' => $cssfile,
+ 'loginerror' => ''));
+
+// End classes -- Begin helper functions
+
///
/// Show text to the browser - escape hatch
function show_text($text, $iserror = false) {
- global $t;
-
- $t->set_file('content','error.html');
- if (!$iserror) $t->set_var('text',$text);
- else $t->set_var('text',"<font color=red>$text</font>");
+ global $t;
+
+ $t->set_file('content','error.html');
+ if (!$iserror) $t->set_var('text',$text);
+ else $t->set_var('text',"<font color=red>$text</font>");
}
$select['priority'] = array(
- 1 => '1 - Low',
- 2 => '2',
- 3 => '3 - Medium',
- 4 => '4',
- 5 => '5 - High'
- );
+ 1 => '1 - Low',
+ 2 => '2',
+ 3 => '3 - Medium',
+ 4 => '4',
+ 5 => '5 - High'
+ );
///
/// Build a select box with the item matching $value selected
function build_select($box, $value = '', $project = 0) {
- global $q, $select;
-
- $text = '';
- $queries = array(
- 'severity' => "select {$box}_id, {$box}_name from $box where sort_order > 0 order by sort_order",
- 'status' => "select {$box}_id, {$box}_name from $box where sort_order > 0 order by sort_order",
- 'resolution' => "select {$box}_id, {$box}_name from $box where sort_order > 0 order by sort_order",
- 'project' => "select {$box}_id, {$box}_name from $box where active = 1 order by {$box}_name",
- 'component' => "select {$box}_id, {$box}_name from $box where project_id = $project order by {$box}_name",
- 'version' => "select {$box}_id, {$box}_name from $box where project_id = $project order by {$box}_name"
- );
-
- switch($box) {
- case 'severity' :
- case 'status' :
- case 'resolution' :
- case 'project' :
- case 'component' :
- case 'version' :
- $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 'os' :
- $q->query("select {$box}_id, {$box}_name, regex from $box order by sort_order");
- while ($row = $q->grab()) {
- if ($value == '' and $row['Regex'] and
- preg_match($row['Regex'],$GLOBALS['HTTP_USER_AGENT'])) $sel = ' selected';
- elseif ($value == $row[$box.'ID']) $sel = ' selected';
- else $sel = '';
- $text .= '<option value="'.
- $row[$box.'_id']."\"$sel>".$row[$box.'_name']."</option>";
- }
- break;
- case 'owner' :
- $q->query("Select user_id, email from 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['email']}</option>";
- }
- break;
- default :
- $deadarray = $select[$box];
- while(list($val,$item) = each($deadarray)) {
- if ($value == $val and $value != '') $sel = ' selected';
- else $sel = '';
- $text .= "<option value=\"$val\"$sel>$item</option>";
- }
- break;
- }
- return $text;
+ global $q, $select;
+
+ $text = '';
+ $queries = array(
+ 'severity' => "select {$box}_id, {$box}_name from $box where sort_order > 0 order by sort_order",
+ 'status' => "select {$box}_id, {$box}_name from $box where sort_order > 0 order by sort_order",
+ 'resolution' => "select {$box}_id, {$box}_name from $box where sort_order > 0 order by sort_order",
+ 'project' => "select {$box}_id, {$box}_name from $box where active = 1 order by {$box}_name",
+ 'component' => "select {$box}_id, {$box}_name from $box where project_id = $project order by {$box}_name",
+ 'version' => "select {$box}_id, {$box}_name from $box where project_id = $project order by {$box}_name"
+ );
+
+ switch($box) {
+ case 'severity' :
+ case 'status' :
+ case 'resolution' :
+ case 'project' :
+ case 'component' :
+ case 'version' :
+ $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 'os' :
+ $q->query("select {$box}_id, {$box}_name, regex from $box order by sort_order");
+ while ($row = $q->grab()) {
+ if ($value == '' and $row['Regex'] and
+ preg_match($row['Regex'],$GLOBALS['HTTP_USER_AGENT'])) $sel = ' selected';
+ elseif ($value == $row[$box.'ID']) $sel = ' selected';
+ else $sel = '';
+ $text .= '<option value="'.
+ $row[$box.'_id']."\"$sel>".$row[$box.'_name']."</option>";
+ }
+ break;
+ case 'owner' :
+ $q->query("Select user_id, email from 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['email']}</option>";
+ }
+ break;
+ default :
+ $deadarray = $select[$box];
+ while(list($val,$item) = each($deadarray)) {
+ if ($value == $val and $value != '') $sel = ' selected';
+ else $sel = '';
+ $text .= "<option value=\"$val\"$sel>$item</option>";
+ }
+ break;
+ }
+ return $text;
}
///
/// Divide the results of a database query into multiple pages
function multipages($nr, $page, $urlstr) {
- global $me, $selrange;
-
- if (!$page) $page = 1;
- if ($page == 'all') {
- $selrange = $nr;
- $llimit = 0;
- $page = 0;
- } else {
- #$selrange = 60;
- $llimit = ($page-1)*$selrange;
- }
- if ($nr) $npages = ceil($nr/$selrange);
- else $npages = 0;
- if ($npages == 1) $pages = 1;
- else {
- for ($i=1; $i<=$npages; $i++) {
- $pages .= $i != $page ? " <a href='$me?page=$i&$urlstr'>$i</a> " : " $i ";
- $pages .= $i != $npages ? '|' : '';
- }
- }
- return array($selrange, $llimit, $npages, $pages);
+ global $me, $selrange;
+
+ if (!$page) $page = 1;
+ if ($page == 'all') {
+ $selrange = $nr;
+ $llimit = 0;
+ $page = 0;
+ } else {
+ #$selrange = 60;
+ $llimit = ($page-1)*$selrange;
+ }
+ if ($nr) $npages = ceil($nr/$selrange);
+ else $npages = 0;
+ if ($npages == 1) $pages = 1;
+ else {
+ for ($i=1; $i<=$npages; $i++) {
+ $pages .= $i != $page ? " <a href='$me?page=$i&$urlstr'>$i</a> " : " $i ";
+ $pages .= $i != $npages ? '|' : '';
+ }
+ }
+ return array($selrange, $llimit, $npages, $pages);
}
-///
+///
/// Sets variables in the templates for the column headers to sort database results
function sorting_headers($url, $headers, $order, $sort, $urlstr = '') {
- global $t;
-
- while(list($k, $v) = each($headers)) {
- $t->set_var($k.'url', "$url?order=$v&sort=".
- ($order == $v ? ($sort == 'asc' ? 'desc' : 'asc') : 'asc').
- ($urlstr ? '&'.$urlstr : ''));
- $t->set_var($k.'color', $order == $v ? '#bbbbbb' : '#eeeeee');
- }
+ global $t;
+
+ while(list($k, $v) = each($headers)) {
+ $t->set_var($k.'url', "$url?order=$v&sort=".
+ ($order == $v ? ($sort == 'asc' ? 'desc' : 'asc') : 'asc').
+ ($urlstr ? '&'.$urlstr : ''));
+ $t->set_var($k.'color', $order == $v ? '#bbbbbb' : '#eeeeee');
+ }
}
///
/// Generates a somewhat random pronounceable password $length letters long
/// (From zend.com user Rival7)
-function genpassword($length){
+function genpassword($length){
- srand((double)microtime()*1000000);
+ srand((double)microtime()*1000000);
- $vowels = array("a", "e", "i", "o", "u");
- $cons = array("b", "c", "d", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "u", "v", "w", "tr",
+ $vowels = array("a", "e", "i", "o", "u");
+ $cons = array("b", "c", "d", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "u", "v", "w", "tr",
- "cr", "br", "fr", "th", "dr", "ch", "ph", "wr", "st", "sp", "sw", "pr", "sl", "cl");
+ "cr", "br", "fr", "th", "dr", "ch", "ph", "wr", "st", "sp", "sw", "pr", "sl", "cl");
- $num_vowels = count($vowels);
- $num_cons = count($cons);
+ $num_vowels = count($vowels);
+ $num_cons = count($cons);
- for($i = 0; $i < $length; $i++){
- $password .= $cons[rand(0, $num_cons - 1)] . $vowels[rand(0, $num_vowels - 1)];
- }
+ for($i = 0; $i < $length; $i++){
+ $password .= $cons[rand(0, $num_cons - 1)] . $vowels[rand(0, $num_vowels - 1)];
+ }
- return substr($password, 0, $length);
-}
+ return substr($password, 0, $length);
+}
///
/// Wrap text - Picked up somewhere on the net - probably zend.com
function textwrap($text, $wrap=72, $break="\n"){
- $len = strlen($text);
- if ($len > $wrap) {
- $h = '';
- $lastWhite = 0;
- $lastChar = 0;
- $lastBreak = 0;
- while ($lastChar < $len) {
- $char = substr($text, $lastChar, 1);
- if (($lastChar - $lastBreak > $wrap) && ($lastWhite > $lastBreak)) {
- $h .= substr($text, $lastBreak, ($lastWhite - $lastBreak)) . $break;
- $lastChar = $lastWhite + 1;
- $lastBreak = $lastChar;
- }
- /* You may wish to include other characters as valid whitespace... */
- if ($char == ' ' || $char == chr(13) || $char == chr(10))
- $lastWhite = $lastChar;
- $lastChar = $lastChar + 1;
- }
- $h .= substr($text, $lastBreak);
- }
- else $h = $text;
- return $h;
+ $len = strlen($text);
+ if ($len > $wrap) {
+ $h = '';
+ $lastWhite = 0;
+ $lastChar = 0;
+ $lastBreak = 0;
+ while ($lastChar < $len) {
+ $char = substr($text, $lastChar, 1);
+ if (($lastChar - $lastBreak > $wrap) && ($lastWhite > $lastBreak)) {
+ $h .= substr($text, $lastBreak, ($lastWhite - $lastBreak)) . $break;
+ $lastChar = $lastWhite + 1;
+ $lastBreak = $lastChar;
+ }
+ /* You may wish to include other characters as valid whitespace... */
+ if ($char == ' ' || $char == chr(13) || $char == chr(10))
+ $lastWhite = $lastChar;
+ $lastChar = $lastChar + 1;
+ }
+ $h .= substr($text, $lastBreak);
+ }
+ else $h = $text;
+ return $h;
}
///
/// Return a delimited list if there is more than one element in $ary, otherwise
/// return the lone element as the list
function delimit_list($delimiter, $ary) {
- if ($ary[1]) return join($delimiter, $ary);
- elseif ($ary[0]) return ($ary[0]);
- else return '';
+ if ($ary[1]) return join($delimiter, $ary);
+ elseif ($ary[0]) return ($ary[0]);
+ else return '';
}
///
/// Check the validity of an email address
/// (From zend.com user russIndr)
-function valid_email($email) {
- return eregi('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$', $email);
+function valid_email($email) {
+ return eregi('^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$', $email);
}
///
/// If the constant is set do a little email masking to make harvesting a little harder
function maskemail($email) {
- global $auth;
-
- if (HIDE_EMAIL && $auth->auth['uid'] == 'nobody') {
- return '******';
- } elseif (MASK_EMAIL) {
- return str_replace('@', ' at ', str_replace('.', ' dot ', $email));
- } else {
- return $email;
- }
+ global $auth;
+
+ if (HIDE_EMAIL && $auth->auth['uid'] == 'nobody') {
+ return '******';
+ } elseif (MASK_EMAIL) {
+ return str_replace('@', ' at ', str_replace('.', ' dot ', $email));
+ } else {
+ return $email;
+ }
}
// Begin every page with a page_open
if (!defined('NO_AUTH')) {
- page_open(array('sess' => 'usess', 'auth' => 'uauth', 'perm' => 'uperm'));
- $u = $auth->auth['uid'];
+ page_open(array('sess' => 'usess', 'auth' => 'uauth', 'perm' => 'uperm'));
+ $u = $auth->auth['uid'];
}
// 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");
- if (!$q->num_rows()) {
- $t->set_var(array(
- 'loginerrorcolor' => '#ff0000',
- 'loginerror' => 'Invalid login<br>'
- ));
- } else {
- if (ENCRYPTPASS) {
- $password = genpassword(10);
- $mpassword = md5($password);
- $q->query("update user set password = '$mpassword' where email = '$username'");
- }
- mail($email, $STRING['newacctsubject'], sprintf($STRING['newacctmessage'],
- $password), 'From: '.ADMINEMAIL);
- $t->set_var(array(
- 'loginerrorcolor' => '#0000ff',
- 'loginerror' => 'Your password has been emailed to you<br>'
- ));
- }
- } else {
- $auth->auth['uid'] = $auth->auth_validatelogin();
- if ($auth->auth['uid'] == 'nobody') {
- $t->set_var(array(
- 'loginerrorcolor' => '#ff0000',
- 'loginerror' => 'Invalid login<br>'
- ));
- }
- }
+ if (isset($HTTP_POST_VARS['sendpass'])) {
+ list($email, $password) = $q->grab("select email, password from user where email = '$username' and user_level > 0");
+ if (!$q->num_rows()) {
+ $t->set_var(array(
+ 'loginerrorcolor' => '#ff0000',
+ 'loginerror' => 'Invalid login<br>'
+ ));
+ } else {
+ if (ENCRYPTPASS) {
+ $password = genpassword(10);
+ $mpassword = md5($password);
+ $q->query("update user set password = '$mpassword' where email = '$username'");
+ }
+ mail($email, $STRING['newacctsubject'], sprintf($STRING['newacctmessage'],
+ $password), 'From: '.ADMINEMAIL);
+ $t->set_var(array(
+ 'loginerrorcolor' => '#0000ff',
+ 'loginerror' => 'Your password has been emailed to you<br>'
+ ));
+ }
+ } else {
+ $auth->auth['uid'] = $auth->auth_validatelogin();
+ if ($auth->auth['uid'] == 'nobody') {
+ $t->set_var(array(
+ 'loginerrorcolor' => '#ff0000',
+ 'loginerror' => 'Invalid login<br>'
+ ));
+ }
+ }
}
-?>
+?>
\ No newline at end of file
|
|
From: Benjamin C. <bc...@us...> - 2001-08-21 16:50:31
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv29582
Modified Files:
include.php
Log Message:
doh
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- include.php 2001/08/21 16:43:23 1.35
+++ include.php 2001/08/21 16:50:27 1.36
@@ -60,7 +60,7 @@
var $Host = 'localhost';
var $Database = 'BugTracker';
var $User = 'root';
- var $Password = 'gr8val20';
+ var $Password = '';
function grab($q_string = '') {
if ($q_string) $this->query($q_string);
|
|
From: Benjamin C. <bc...@us...> - 2001-08-21 16:43:27
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv25166
Modified Files:
include.php query.php user.php
Log Message:
Selectable columns works!
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- include.php 2001/08/21 14:29:59 1.34
+++ include.php 2001/08/21 16:43:23 1.35
@@ -60,7 +60,7 @@
var $Host = 'localhost';
var $Database = 'BugTracker';
var $User = 'root';
- var $Password = '';
+ var $Password = 'gr8val20';
function grab($q_string = '') {
if ($q_string) $this->query($q_string);
@@ -100,30 +100,21 @@
'priority' => 'Priority',
'status_name' => 'Status',
'resolution_name' => 'Resolution',
- 'assigned_to' => 'Assigned To',
'reporter' => 'Reporter',
'owner' => 'Owner',
- 'created_date' => 'Created',
- 'last_modified_by' => 'Last Modified',
- 'last_modified_date' => 'Last Modified By',
+ 'created_date' => 'Created Date',
+ 'lastmodifier' => 'Last Modified By',
+ 'last_modified_date' => 'Last Modified Date',
'project_name' => 'Project',
'version_name' => 'Version',
'component_name' => 'Component',
'os_name' => 'OS',
'browser_string' => 'Browser',
- 'close_date' => 'Closed'
+ 'close_date' => 'Closed Date'
);
-$default_db_fields = array(
- 'bug_id' => 'ID',
- 'title' => 'Title',
- 'reporter' => 'Reporter',
- 'owner' => 'Owner',
- 'severity_name' => 'Severity',
- 'priority' => 'Priority',
- 'status_name' => 'Status',
- 'resolution_name' => 'Resolution'
- );
+$default_db_fields = array('bug_id', 'title', 'reporter', 'owner',
+ 'severity_name', 'priority', 'status_name', 'resolution_name');
class sqlclass extends CT_Sql {
var $database_class = 'dbclass';
@@ -172,6 +163,11 @@
$this->auth['db_fields'] = unserialize($u['bug_list_fields']);
return $u['user_id'];
}
+ }
+
+ function unauth($nobody = false) {
+ Auth::unauth($nobody);
+ $this->auth['db_fields'] = '';
}
}
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- query.php 2001/08/21 14:29:59 1.21
+++ query.php 2001/08/21 16:43:23 1.22
@@ -159,7 +159,7 @@
function list_items($assignedto = 0, $reportedby = 0, $open = 0) {
global $querystring, $me, $q, $t, $selrange, $order, $sort, $query,
$page, $op, $select, $TITLE, $STRING, $savedqueryname, $u, $auth,
- $default_db_fields;
+ $default_db_fields, $all_db_fields;
$t->set_file('content','buglist.html');
$t->set_block('content','row','rows');
@@ -185,7 +185,7 @@
'project' => build_select('project'),
'TITLE' => $TITLE['buglist']));
- $q->query("select bug.*, reporter.email as reporter, owner.email as owner, severity_name, status_name, version_name, component_name, resolution_name, severity_color from bug left join resolution using (resolution_id), severity, status, version, component left join user owner on bug.assigned_to = owner.user_id left join user reporter on bug.created_by = reporter.user_id where bug.severity_id = severity.severity_id and bug.status_id = status.status_id and bug.version_id = version.version_id and bug.component_id = component.component_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 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");
$headers = array(
'bug_id' => 'bug_id',
@@ -197,10 +197,13 @@
'status_name' => 'status.sort_order',
'owner' => 'owner',
'reporter' => 'reporter',
+ 'lastmodifier' => 'last_modifier',
'created_date' => 'created_date',
- 'project_name' => 'project_id',
+ 'last_modified_date' => 'last_modified_date',
+ 'project_name' => 'project_name',
'component_name' => 'component_name',
- 'os_name' => 'os_id',
+ 'version_name' => 'version_name',
+ 'os_name' => 'os_name',
'browser_string' => 'browser_string',
'resolution_name' => 'resolution.sort_order',
'close_date' => 'close_date');
@@ -217,9 +220,9 @@
// Header row
$db_fields = $auth->auth['db_fields'] ? $auth->auth['db_fields'] :
$default_db_fields;
- foreach ($db_fields as $field => $title) {
+ foreach ($db_fields as $field) {
$t->set_var(array(
- 'coldata' => "<a href='{{$field}url}'>$title</a>",
+ 'coldata' => "<a href='{{$field}url}'>{$all_db_fields[$field]}</a>",
'td-extra' => "class=\"header-col\" bgcolor=\"{{$field}color}\""
));
$t->parse('cols', 'col', true);
@@ -232,7 +235,7 @@
while ($row = $q->grab()) {
$bgcolor = USE_SEVERITY_COLOR ? $row['severity_color'] :
((++$i % 2 == 0) ? '#dddddd' : '#ffffff');
- foreach ($db_fields as $field => $title) {
+ foreach ($db_fields as $field) {
switch ($field) {
case 'url' :
$coldata = "<a href='{$row[$field]}'>{$row[$field]}</a>";
@@ -241,7 +244,7 @@
case 'created_date' :
case 'last_modified_date' :
case 'close_date' :
- $coldata = date(DATEFORMAT, $row[$field]);
+ $coldata = $row[$field] ? date(DATEFORMAT, $row[$field]) : ' ';
$td_extra = 'class="center-col"';
break;
case 'bug_id' :
@@ -251,6 +254,7 @@
break;
case 'reporter' :
case 'owner' :
+ case 'lastmodifier' :
$coldata = maskemail($row[$field]);
$td_extra = 'class="center-col"';
break;
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/user.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- user.php 2001/08/21 14:29:59 1.11
+++ user.php 2001/08/21 16:43:23 1.12
@@ -68,11 +68,14 @@
$my_fields = $auth->auth['db_fields'] ? $auth->auth['db_fields'] :
$default_db_fields;
+ foreach ($my_fields as $field) {
+ $checked[$field] = true;
+ }
foreach ($all_db_fields as $field => $title) {
$t->set_var(array(
'column_name' => $field,
'column_title' => $title,
- 'checked' => $my_fields[$field] ? 'checked' : ''
+ 'checked' => $checked[$field] ? 'checked' : ''
));
$t->parse('list_rows', 'column_list_row', true);
}
|
|
From: Benjamin C. <bc...@us...> - 2001-08-21 14:30:04
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv870
Modified Files:
include.php query.php user.php
Log Message:
Bug columns still broken, but getting closer
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- include.php 2001/08/20 23:16:50 1.33
+++ include.php 2001/08/21 14:29:59 1.34
@@ -169,6 +169,7 @@
$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']);
return $u['user_id'];
}
}
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- query.php 2001/08/20 23:16:50 1.20
+++ query.php 2001/08/21 14:29:59 1.21
@@ -158,7 +158,8 @@
function list_items($assignedto = 0, $reportedby = 0, $open = 0) {
global $querystring, $me, $q, $t, $selrange, $order, $sort, $query,
- $page, $op, $select, $TITLE, $STRING, $savedqueryname, $u, $default_db_fields;
+ $page, $op, $select, $TITLE, $STRING, $savedqueryname, $u, $auth,
+ $default_db_fields;
$t->set_file('content','buglist.html');
$t->set_block('content','row','rows');
@@ -214,7 +215,9 @@
}
// Header row
- foreach ($default_db_fields as $field => $title) {
+ $db_fields = $auth->auth['db_fields'] ? $auth->auth['db_fields'] :
+ $default_db_fields;
+ foreach ($db_fields as $field => $title) {
$t->set_var(array(
'coldata' => "<a href='{{$field}url}'>$title</a>",
'td-extra' => "class=\"header-col\" bgcolor=\"{{$field}color}\""
@@ -229,7 +232,7 @@
while ($row = $q->grab()) {
$bgcolor = USE_SEVERITY_COLOR ? $row['severity_color'] :
((++$i % 2 == 0) ? '#dddddd' : '#ffffff');
- foreach ($default_db_fields as $field => $title) {
+ foreach ($db_fields as $field => $title) {
switch ($field) {
case 'url' :
$coldata = "<a href='{$row[$field]}'>{$row[$field]}</a>";
@@ -270,7 +273,7 @@
$t->parse('rows','row',true);
$t->set_var('cols', '');
}
- $t->set_var('numcols', count($default_db_fields));
+ $t->set_var('numcols', count($db_fields));
}
$t->set_file('wrap','wrap.html');
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/user.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- user.php 2001/08/20 23:16:50 1.10
+++ user.php 2001/08/21 14:29:59 1.11
@@ -24,11 +24,13 @@
include 'include.php';
function change_bug_list_columns($column_list) {
- global $q, $u, $t;
+ global $q, $u, $t, $auth;
+ $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");
- $t->set_file('content', 'columnlistchanged.html');
+ //$t->set_file('content', 'columnlistchanged.html');
+ show_text('Your bug list column preferences have been saved');
}
function change_password($pass1, $pass2) {
@@ -79,9 +81,9 @@
$t->set_file('wrap', 'wrap.html');
$perm->check('User');
-if ($do) switch ($op) {
- case 'changepassword' : change_password($_gv['pass1'], $_gv['pass2']); break;
- case 'changecolumnlist' : change_bug_list_columns($_gv['column_list']); break;
+if ($do) switch ($do) {
+ case 'changepassword' : change_password($_pv['pass1'], $_pv['pass2']); break;
+ case 'changecolumnlist' : change_bug_list_columns($_pv['column_list']); break;
default : show_preferences_form();
}
else show_preferences_form();
|
|
From: Benjamin C. <bc...@us...> - 2001-08-21 14:29:38
|
Update of /cvsroot/phpbt/phpbt In directory usw-pr-cvs1:/tmp/cvs-serv622 Modified Files: CHANGELOG Log Message: Index: CHANGELOG =================================================================== RCS file: /cvsroot/phpbt/phpbt/CHANGELOG,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- CHANGELOG 2001/08/14 12:54:04 1.11 +++ CHANGELOG 2001/08/21 14:29:35 1.12 @@ -1,3 +1,8 @@ +-- 0.3.0 -- +: Converted database schema to lower-case to ease DB portability. +: Added the option to color rows in the bug list according to severity. +: Changed the columns in the bug list to be dynamic and user-configurable. + -- 0.2.1 -- 14 Aug 2001 : Bugfix to the configure script : Updated the installation instructions |