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-07-15 23:39:43
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv1636
Modified Files:
version.php
Log Message:
Set the creation date when creating a new version
Index: version.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/version.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- version.php 2001/02/03 18:16:04 1.3
+++ version.php 2001/07/15 23:39:40 1.4
@@ -3,9 +3,10 @@
include '../include.php';
page_open(array('sess' => 'usess', 'auth' => 'uauth', 'perm' => 'uperm'));
+$u = $auth->auth['uid'];
function do_form($versionid = 0) {
- global $q, $me, $projectid, $version, $active, $STRING;
+ global $q, $me, $projectid, $version, $active, $STRING, $now, $u;
// Validation
if (!$version = trim($version))
@@ -14,11 +15,9 @@
if (!$active) $active = 0;
if (!$versionid) {
- $q->query("insert into Version (VersionID, ProjectID, Name, Active) values
- (".$q->nextid('Version').", $projectid, '$version', '$active')");
+ $q->query("insert into Version (VersionID, ProjectID, Name, Active, CreatedBy, CreatedDate) values (".$q->nextid('Version').", $projectid, '$version', '$active', $u, $now)");
} else {
- $q->query("update Version set ProjectID=$projectid, Name='$version',
- Active='$active' where VersionID = '$versionid'");
+ $q->query("update Version set ProjectID=$projectid, Name='$version', Active='$active' where VersionID = '$versionid'");
}
header("Location: project.php?op=edit&id=$projectid");
}
|
|
From: Benjamin C. <bc...@us...> - 2001-07-11 13:07:32
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv16802
Modified Files:
bug.php
Log Message:
Include the STRING variable for the error message
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- bug.php 2001/07/11 13:05:44 1.11
+++ bug.php 2001/07/11 13:07:29 1.12
@@ -10,7 +10,7 @@
///
/// Show the activity for a bug
function show_history($bugid) {
- global $q, $t;
+ global $q, $t, $STRING;
if (!is_numeric($bugid)) {
show_text($STRING['nobughistory']);
|
|
From: Benjamin C. <bc...@us...> - 2001-07-11 13:05:47
|
Update of /cvsroot/phpbt/phpbt/templates
In directory usw-pr-cvs1:/tmp/cvs-serv16465/templates
Modified Files:
bugdisplay.html
Added Files:
bughistory.html
Log Message:
Added bug history
--- NEW FILE: bughistory.html ---
<table border="0" cellspacing="2" cellpadding="2">
<tr bgcolor="#eeeeee">
<th>Who</th>
<th>What</th>
<th>Old Value</th>
<th>New Value</th>
<th>When</th>
</tr>
<!-- BEGIN row -->
<tr>
<td bgcolor="{bgcolor}">{createdby}</td>
<td bgcolor="{bgcolor}">{field}</td>
<td bgcolor="{bgcolor}"> {oldvalue}</td>
<td bgcolor="{bgcolor}"> {newvalue}</td>
<td bgcolor="{bgcolor}">{date}</td>
</tr>
<!-- END row -->
</table>
<br>
<a href="{me}?op=show&bugid={bugid}">Back to bug #{bugid}</a>
<br>
<br>
Index: bugdisplay.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/bugdisplay.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- bugdisplay.html 2001/06/27 13:41:21 1.3
+++ bugdisplay.html 2001/07/11 13:05:44 1.4
@@ -130,6 +130,9 @@
</tr>
</table>
</form>
+<a href="{me}?op=history&bugid={bugid}">View bug activity</a>
+<br>
+<br>
<table border="0" cellpadding="2" cellspacing="0" width="640">
<tr>
<td>
|
|
From: Benjamin C. <bc...@us...> - 2001-07-11 13:05:47
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv16465
Modified Files:
bug.php strings-en.php
Log Message:
Added bug history
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- bug.php 2001/07/10 14:00:44 1.10
+++ bug.php 2001/07/11 13:05:44 1.11
@@ -5,17 +5,49 @@
include 'include.php';
page_open(array('sess' => 'usess', 'auth' => 'uauth', 'perm' => 'uperm'));
-
$u = $auth->auth['uid'];
///
+/// Show the activity for a bug
+function show_history($bugid) {
+ global $q, $t;
+
+ if (!is_numeric($bugid)) {
+ show_text($STRING['nobughistory']);
+ return;
+ }
+
+ $q->query("select bh.*, Email from BugHistory bh left join User on CreatedBy = UserID where BugID = $bugid");
+ if (!$q->num_rows()) {
+ show_text($STRING['nobughistory']);
+ return;
+ }
+
+ $t->set_file('content','bughistory.html');
+ $t->set_block('content', 'row', 'rows');
+ $t->set_var('bugid', $bugid);
+ while ($row = $q->grab()) {
+ $t->set_var(array(
+ 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
+ 'field' => stripslashes($row['ChangedField']),
+ 'oldvalue' => stripslashes($row['OldValue']),
+ 'newvalue' => stripslashes($row['NewValue']),
+ 'createdby' => stripslashes($row['Email']),
+ 'date' => date(DATEFORMAT.' '.TIMEFORMAT, $row['CreatedDate'])
+ ));
+ $t->parse('rows', 'row', true);
+ }
+}
+
+///
/// Send the email about changes to the bug and (later) log the changes in the DB
function do_changedfields($userid, $buginfo, $cf, $comments) {
- global $q, $t, $u, $select;
+ global $q, $t, $u, $select, $now;
$t->set_file('emailout','bugemail.txt');
foreach(array('Title','URL') as $field) {
- if ($cf[$field]) {
+ if (isset($cf[$field])) {
+ $q->query("insert into BugHistory (BugID, ChangedField, OldValue, NewValue, CreatedBy, CreatedDate) values ({$buginfo['BugID']}, '$field', '$buginfo[$field]', '$cf[$field]', $u, $now)");
$t->set_var(array(
$field => $cf[$field],
$field.'Stat' => '!'
@@ -30,16 +62,17 @@
foreach(array('Project','Component','Status','Resolution','Severity','OS',
'Version') as $field) {
+ $oldvalue = $q->grab_field("select Name from $field where ${field}ID = $buginfo[$field]");
if ($cf[$field]) {
- $t->set_var(array(
- $field => $q->grab_field("select Name from $field where ${field}ID =
- $cf[$field]"),
+ $newvalue = $q->grab_field("select Name from $field where ${field}ID = $cf[$field]");
+ $q->query("insert into BugHistory (BugID, ChangedField, OldValue, NewValue, CreatedBy, CreatedDate) values ({$buginfo['BugID']}, '$field', '$oldvalue', '$newvalue', $u, $now)");
+ $t->set_var(array(
+ $field => $newvalue,
$field.'Stat' => '!'
));
} else {
$t->set_var(array(
- $field => $q->grab_field("select Name from $field where ${field}ID =
- $buginfo[$field]"),
+ $field => $oldvalue,
$field.'Stat' => ' '
));
}
@@ -123,7 +156,12 @@
if ($pv = $GLOBALS['HTTP_POST_VARS']) {
while (list($k,$v) = each($GLOBALS['HTTP_POST_VARS'])) {
$$k = $v;
- if ($buginfo[$k] and $buginfo[$k] != $v) $changedfields[$k] = $v;
+ if ($k == 'URL') {
+ if ($v == 'http://') $v = '';
+ elseif ($v and substr($v,0,7) != 'http://') $v = 'http://'.$v;
+ $URL = $v;
+ }
+ if ($buginfo[$k] != $v) { $changedfields[$k] = $v; }
}
}
@@ -209,8 +247,6 @@
from Status where Name = '$statusfield'");
$changedfields['Status'] = $status;
}
- if ($URL == 'http://') $URL = '';
- elseif ($URL and substr($URL,0,7) != 'http://') $URL = 'http://'.$URL;
$q->query("Update Bug set Title = '$Title', URL = '$URL', Severity = $Severity,
Priority = $Priority, ".($status ? "Status = $status, " : '').
@@ -440,6 +476,7 @@
if ($op) {
switch($op) {
+ case 'history' : show_history($bugid); break;
case 'add' :
if ($project) show_form();
else show_projects();
Index: strings-en.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/strings-en.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- strings-en.php 2001/07/10 04:01:54 1.5
+++ strings-en.php 2001/07/11 13:05:44 1.6
@@ -29,7 +29,8 @@
'bugbadperm' => 'You cannot change this bug',
'bugbadnum' => 'That bug does not exist',
'datecollision' => 'Someone has updated this bug since you viewed it. The bug info has been reloaded with the latest changes.',
- 'passwordmatch' => 'Those passwords don\'t match -- please try again'
+ 'passwordmatch' => 'Those passwords don\'t match -- please try again',
+ 'nobughistory' => 'There is no history for that bug'
);
// Page titles
|
|
From: Benjamin C. <bc...@us...> - 2001-07-11 03:36:07
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv18468
Modified Files:
createdb.sql query.php
Log Message:
Allow users to save queries
Index: createdb.sql
===================================================================
RCS file: /cvsroot/phpbt/phpbt/createdb.sql,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- createdb.sql 2001/02/03 18:15:52 1.2
+++ createdb.sql 2001/07/11 03:36:04 1.3
@@ -188,6 +188,19 @@
insert into db_sequence values ('Resolution', 6);
#
+# Table structure for table 'SavedQuery'
+#
+
+DROP TABLE IF EXISTS SavedQuery;
+CREATE TABLE SavedQuery (
+ SavedQueryID int(10) unsigned NOT NULL auto_increment,
+ UserID int(10) unsigned DEFAULT '0' NOT NULL,
+ SavedQueryName varchar(40) NOT NULL,
+ SavedQueryString text NOT NULL,
+ PRIMARY KEY (SavedQueryID, UserID)
+);
+
+#
# Table structure for table 'Severity'
#
@@ -269,7 +282,3 @@
PRIMARY KEY (name,sid),
KEY changed (changed)
);
-
-# Upgrading from 0.1.2 to 0.1.3
-# alter table Bug add LastModifiedBy int(10) unsigned DEFAULT '0' NOT NULL after CreatedDate, add LastModifiedDate bigint(20) unsigned DEFAULT '0' NOT NULL after LastModifiedBy;
-# alter table Version change Version Name char (10) DEFAULT '' NOT NULL;
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- query.php 2001/07/10 14:00:44 1.6
+++ query.php 2001/07/11 03:36:04 1.7
@@ -5,14 +5,23 @@
include 'include.php';
page_open(array('sess' => 'usess', 'auth' => 'uauth'));
+$u = $auth->auth['uid'];
+function delete_saved_query($queryid) {
+ global $q, $u, $me;
+
+ $q->query("delete from SavedQuery where UserID = $u and SavedQueryID = $queryid");
+ header("Location: $me?op=query");
+}
+
function show_query() {
- global $q, $t, $status, $resolution, $os, $priority, $severity, $TITLE;
+ global $q, $t, $status, $resolution, $os, $priority, $severity, $TITLE, $u;
$nq = new dbclass;
$t->set_file('content','queryform.html');
-
+ $t->set_block('content','row','rows');
+
// Build the javascript-powered select boxes
$q->query("select ProjectID, Name from Project where Active order by Name");
while (list($pid, $pname) = $q->grab()) {
@@ -34,6 +43,21 @@
if (substr($js,-1) == ',') $js = substr($js,0,-1);
$js .= ");\n";
}
+
+ // Grab the saved queries if there are any
+ $q->query("select * from SavedQuery where UserID = $u");
+ if (!$q->num_rows()) {
+ $t->set_var('rows','');
+ } else {
+ while ($row = $q->grab()) {
+ $t->set_var(array(
+ 'savedquerystring' => $row['SavedQueryString'],
+ 'savedqueryname' => stripslashes($row['SavedQueryName']),
+ 'savedqueryid' => $row['SavedQueryID']
+ ));
+ $t->parse('rows', 'row', true);
+ }
+ }
$t->set_var(array(
'js' => $js,
@@ -109,11 +133,16 @@
function list_items($showmybugs = false) {
global $querystring, $me, $q, $t, $selrange, $order, $sort, $query,
- $page, $op, $select, $TITLE, $STRING;
+ $page, $op, $select, $TITLE, $STRING, $savedqueryname, $u;
$t->set_file('content','buglist.html');
$t->set_block('content','row','rows');
+ // Save the query if requested
+ if ($savedqueryname) {
+ $savedquerystring = ereg_replace('&savedqueryname=.*(&?)', '\\1', $GLOBALS['QUERY_STRING']);
+ $q->query("insert into SavedQuery (UserID, SavedQueryName, SavedQueryString) values ($u, '$savedqueryname', '$savedquerystring')");
+ }
if (!$order) { $order = 'BugID'; $sort = 'asc'; }
if (!$querystring or $op) build_query($showmybugs);
$nr = $q->grab_field("select count(*) from Bug left join User Owner on
@@ -195,6 +224,7 @@
if ($op) switch($op) {
case 'query' : show_query(); break;
case 'doquery' : list_items(); break;
+ case 'delquery' : delete_saved_query($queryid); break;
case 'mybugs' : list_items(true); break;
default : show_query(); break;
}
|
|
From: Benjamin C. <bc...@us...> - 2001-07-11 03:36:07
|
Update of /cvsroot/phpbt/phpbt/templates
In directory usw-pr-cvs1:/tmp/cvs-serv18468/templates
Modified Files:
queryform.html
Log Message:
Allow users to save queries
Index: queryform.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/queryform.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- queryform.html 2001/07/10 14:00:44 1.3
+++ queryform.html 2001/07/11 03:36:04 1.4
@@ -208,12 +208,19 @@
</nobr>
<br>
<br>
- <a href="{me}?op=mybugs">List bugs assigned to me</a>
+ Save this query as: <input maxlength="40" type="text" name="savedqueryname">
<br>
- <br>
<input type="reset" value="Reset back to the default query">
- <input type="submit" value="Submit query">
+ <input type="submit" value="Submit query">
</form>
+ <hr align="left" size="1" width="640">
+ <b>Saved Queries</b>
+ <br>
+ <a href="{me}?op=mybugs">List bugs assigned to me</a>
+ <br>
+ <!-- BEGIN row -->
+ <a href="{me}?{savedquerystring}">{savedqueryname}</a> (<a href="{me}?op=delquery&queryid={savedqueryid}" onClick="return confirm('Are you sure you want to delete this saved query?');">Delete</a>)<br>
+ <!-- END row -->
</body>
</html>
|
|
From: Benjamin C. <bc...@us...> - 2001-07-10 14:00:47
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv6103
Modified Files:
bug.php include.php query.php
Log Message:
Added link for personal bug list to query form
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- bug.php 2001/07/02 00:55:24 1.9
+++ bug.php 2001/07/10 14:00:44 1.10
@@ -94,7 +94,7 @@
if ($userid != ($cf['AssignedTo'] ? $cf['AssignedTo'] : $buginfo['AssignedTo']))
$maillist[] = $assignedto;
// Leter add a watcher (such as QA person) check here
- $toemail = join(', ',$maillist);
+ $toemail = delimit_list(', ',$maillist);
$t->set_var(array(
'bugid' => $buginfo['BugID'],
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- include.php 2001/07/10 03:15:20 1.9
+++ include.php 2001/07/10 14:00:44 1.10
@@ -346,4 +346,13 @@
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 '';
+}
+
?>
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- query.php 2001/07/02 00:41:49 1.5
+++ query.php 2001/07/10 14:00:44 1.6
@@ -44,70 +44,78 @@
'priority' => build_select('priority',$priority),
'severity' => build_select('Severity',$severity),
'projects' => build_select('Project'),
- 'TITLE' => $TITLE[bugquery]
+ 'TITLE' => $TITLE['bugquery']
));
}
-function build_query() {
- global $q, $sess, $querystring, $status, $resolution, $os, $priority,
+function build_query($showmybugs = false) {
+ global $q, $sess, $auth, $querystring, $status, $resolution, $os, $priority,
$severity, $email1, $emailtype1, $emailfield1, $Title, $Description, $URL,
$Title_type, $Description_type, $URL_type, $projects, $versions, $components;
- // Select boxes
- if ($status) $flags[] = 'Status in ('.join(',',$status).')';
- if ($resolution) $flags[] = 'Resolution in ('.join(',',$resolution).')';
- if ($os) $flags[] = 'OS in ('.join(',',$os).')';
- if ($priority) $flags[] = 'Priority in ('.join(',',$priority).')';
- if ($severity) $flags[] = 'Severity in ('.join(',',$severity).')';
- if ($flags) $query[] = '('.join(' or ',$flags).')';
-
- // Email field(s)
- if ($email1) {
- switch($emailtype1) {
- case 'like' : $econd = "like '%$email1%'"; break;
- case 'rlike' :
- case 'not rlike' :
- case '=' : $econd = "$emailtype1 '$email1'"; break;
- }
- foreach($emailfield1 as $field) $equery[] = "$field.Email $econd";
- $query[] = '('.join(' or ',$equery).')';
- }
-
- // Text search field(s)
- foreach(array('Title','Description','URL') as $searchfield) {
- if ($$searchfield) {
- switch (${$searchfield."_type"}) {
- case 'like' : $cond = "like '%".$$searchfield."%'"; break;
- case 'rlike' : $cond = "rlike '".$$searchfield."'"; break;
- case 'not rlike' :$cond = "not rlike '".$$searchfield."'"; break;
- }
- $fields[] = "$searchfield $cond";
- }
- }
- if ($fields) $query[] = '('.join(' or ',$fields).')';
-
- // Project/Version/Component
- if ($projects) {
- $proj[] = "Bug.Project = $projects";
- if ($versions) $proj[] = "Bug.Version = $versions";
- if ($components) $proj[] = "Component = $components";
- $query[] = '('.join(' and ',$proj).')';
+ // Open bugs assigned to the user -- a hit list
+ if ($showmybugs) {
+ $q->query("select StatusID from Status where Name in ('Unconfirmed', 'New', 'Assigned', 'Reopened')");
+ while ($statusid = $q->grab_field()) $status[] = $statusid;
+ $query[] = 'Status in ('.delimit_list(',',$status).')';
+ $query[] = "AssignedTo = {$auth->auth['uid']}";
+ } else {
+ // Select boxes
+ if ($status) $flags[] = 'Status in ('.delimit_list(',',$status).')';
+ if ($resolution) $flags[] = 'Resolution in ('.delimit_list(',',$resolution).')';
+ if ($os) $flags[] = 'OS in ('.delimit_list(',',$os).')';
+ if ($priority) $flags[] = 'Priority in ('.delimit_list(',',$priority).')';
+ if ($severity) $flags[] = 'Severity in ('.delimit_list(',',$severity).')';
+ if ($flags) $query[] = '('.delimit_list(' or ',$flags).')';
+
+ // Email field(s)
+ if ($email1) {
+ switch($emailtype1) {
+ case 'like' : $econd = "like '%$email1%'"; break;
+ case 'rlike' :
+ case 'not rlike' :
+ case '=' : $econd = "$emailtype1 '$email1'"; break;
+ }
+ foreach($emailfield1 as $field) $equery[] = "$field.Email $econd";
+ $query[] = '('.delimit_list(' or ',$equery).')';
+ }
+
+ // Text search field(s)
+ foreach(array('Title','Description','URL') as $searchfield) {
+ if ($$searchfield) {
+ switch (${$searchfield."_type"}) {
+ case 'like' : $cond = "like '%".$$searchfield."%'"; break;
+ case 'rlike' : $cond = "rlike '".$$searchfield."'"; break;
+ case 'not rlike' :$cond = "not rlike '".$$searchfield."'"; break;
+ }
+ $fields[] = "$searchfield $cond";
+ }
+ }
+ if ($fields) $query[] = '('.delimit_list(' or ',$fields).')';
+
+ // Project/Version/Component
+ if ($projects) {
+ $proj[] = "Bug.Project = $projects";
+ if ($versions) $proj[] = "Bug.Version = $versions";
+ if ($components) $proj[] = "Component = $components";
+ $query[] = '('.delimit_list(' and ',$proj).')';
+ }
}
-
- if ($query) $querystring = join (' and ',$query);
+
+ if ($query) $querystring = delimit_list(' and ',$query);
if (!$sess->is_registered('querystring')) $sess->register('querystring');
}
-function list_items() {
+function list_items($showmybugs = false) {
global $querystring, $me, $q, $t, $selrange, $order, $sort, $query,
$page, $op, $select, $TITLE, $STRING;
-
+
$t->set_file('content','buglist.html');
$t->set_block('content','row','rows');
if (!$order) { $order = 'BugID'; $sort = 'asc'; }
- if (!$querystring or $op == 'doquery') build_query();
+ if (!$querystring or $op) build_query($showmybugs);
$nr = $q->grab_field("select count(*) from Bug left join User Owner on
Bug.AssignedTo = Owner.UserID left join User Reporter on
Bug.CreatedBy = Reporter.UserID ".($querystring != '' ? "where $querystring": ''));
@@ -184,7 +192,12 @@
$t->set_file('wrap','wrap.html');
-if ($op == 'query') show_query();
+if ($op) switch($op) {
+ case 'query' : show_query(); break;
+ case 'doquery' : list_items(); break;
+ case 'mybugs' : list_items(true); break;
+ default : show_query(); break;
+}
else list_items();
$t->pparse('main',array('content','wrap','main'));
|
|
From: Benjamin C. <bc...@us...> - 2001-07-10 14:00:47
|
Update of /cvsroot/phpbt/phpbt/templates
In directory usw-pr-cvs1:/tmp/cvs-serv6103/templates
Modified Files:
queryform.html wrap.html
Log Message:
Added link for personal bug list to query form
Index: queryform.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/queryform.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- queryform.html 2000/12/26 17:37:08 1.2
+++ queryform.html 2001/07/10 14:00:44 1.3
@@ -205,8 +205,14 @@
<option selected value="asc">Ascending</option>
<option value="desc">Descending</option>
</select>
- </nobr> <input type="submit" value="Submit query"><input type="reset"
- value="Reset back to the default query">
+ </nobr>
+ <br>
+ <br>
+ <a href="{me}?op=mybugs">List bugs assigned to me</a>
+ <br>
+ <br>
+ <input type="reset" value="Reset back to the default query">
+ <input type="submit" value="Submit query">
</form>
</body>
Index: wrap.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/wrap.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- wrap.html 2001/07/10 04:01:54 1.5
+++ wrap.html 2001/07/10 14:00:44 1.6
@@ -5,7 +5,6 @@
<link rel="StyleSheet" href="global.css" type="text/css">
</head>
<body bgcolor="#ffffff" link="#006699" vlink="#006699" alink="#006699">
-<div align="center">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="640" colspan="2"><hr size="1" width="640"></td>
@@ -55,4 +54,3 @@
</td>
</tr>
</table>
-</div>
|
|
From: Benjamin C. <bc...@us...> - 2001-07-10 04:01:57
|
Update of /cvsroot/phpbt/phpbt/templates
In directory usw-pr-cvs1:/tmp/cvs-serv20009/templates
Modified Files:
wrap.html
Added Files:
passwordchanged.html passwordform.html
Log Message:
Starting on the user page - allow for password changes
--- NEW FILE: passwordchanged.html ---
Your password has been changed successfully
<br>
<br>
<a href="index.php">Return to phpBugTracker home</a>
--- NEW FILE: passwordform.html ---
<form action="{me}" method="{post}">
<input type="hidden" name="do" value="changepassword">
<table border="0" cellpadding="0" cellspacing="0" width="600">
<tr>
<td colspan="2" width="600"><b>Change Password</b></td>
</tr>
<tr>
<td colspan="2" width="600">
<font color="#ff0000">{error}</font>
</td>
</tr>
<tr>
<td colspan="2" width="600">Please enter your new password twice below</td>
</tr>
<tr>
<td>Password: </td>
<td><input type="password" name="pass1" value="{pass1}"></td>
</tr>
<tr>
<td>Verify: </td>
<td><input type="password" name="pass2" value="{pass2}"></td>
</tr>
<tr>
<td colspan="2">
<input type="reset">
<input type="submit" value="Submit">
</td>
</tr>
</table>
</form>
Index: wrap.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/wrap.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- wrap.html 2001/07/10 03:15:20 1.4
+++ wrap.html 2001/07/10 04:01:54 1.5
@@ -5,6 +5,7 @@
<link rel="StyleSheet" href="global.css" type="text/css">
</head>
<body bgcolor="#ffffff" link="#006699" vlink="#006699" alink="#006699">
+<div align="center">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="640" colspan="2"><hr size="1" width="640"></td>
@@ -54,3 +55,4 @@
</td>
</tr>
</table>
+</div>
|
|
From: Benjamin C. <bc...@us...> - 2001-07-10 04:01:57
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv20009
Modified Files:
strings-en.php user.php
Log Message:
Starting on the user page - allow for password changes
Index: strings-en.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/strings-en.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- strings-en.php 2001/06/27 13:41:21 1.4
+++ strings-en.php 2001/07/10 04:01:54 1.5
@@ -28,7 +28,8 @@
'nousers' => 'No users found',
'bugbadperm' => 'You cannot change this bug',
'bugbadnum' => 'That bug does not exist',
- 'datecollision' => 'Someone has updated this bug since you viewed it. The bug info has been reloaded with the latest changes.'
+ 'datecollision' => 'Someone has updated this bug since you viewed it. The bug info has been reloaded with the latest changes.',
+ 'passwordmatch' => 'Those passwords don\'t match -- please try again'
);
// Page titles
Index: user.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/user.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- user.php 2001/02/03 18:06:04 1.1
+++ user.php 2001/07/10 04:01:54 1.2
@@ -1,5 +1,46 @@
-<html>
-<body>
-<div align="center">Nothing here yet</div>
-</body>
-</html>
+<?php
+
+// user.php - Preferences page
+
+include 'include.php';
+
+page_open(array('sess' => 'usess', 'auth' => 'uauth', 'perm' => 'uperm'));
+
+$u = $auth->auth['uid'];
+
+function change_password($pass1, $pass2) {
+ global $t, $q, $u, $STRING;
+
+ if (!$pass1 = trim($pass1)) $error = $STRING['givepassword'];
+ elseif ($pass1 != $pass2) $error = $STRING['passwordmatch'];
+
+ if ($error) {
+ show_password_form($error);
+ return;
+ }
+
+ $q->query("update User set Password = '$pass1' where UserID = $u");
+ $t->set_file('content', 'passwordchanged.html');
+}
+
+function show_password_form($error = '') {
+ global $t, $pass1, $pass2;
+
+ $t->set_file('content', 'passwordform.html');
+ $t->set_var(array(
+ 'error' => $error ? $error.'<br><br>' : '',
+ 'pass1' => $pass1,
+ 'pass2' => $pass2
+ ));
+}
+
+$t->set_file('wrap', 'wrap.html');
+
+if ($do) change_password($pass1, $pass2);
+else show_password_form();
+
+$t->pparse('main', array('content', 'wrap', 'main'));
+
+page_close();
+
+?>
|
|
From: Benjamin C. <bc...@us...> - 2001-07-10 03:15:23
|
Update of /cvsroot/phpbt/phpbt/templates
In directory usw-pr-cvs1:/tmp/cvs-serv10698/templates
Modified Files:
wrap.html
Log Message:
Get rid of the logout link entirely if not logged in
Index: wrap.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/templates/wrap.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- wrap.html 2001/06/30 16:45:36 1.3
+++ wrap.html 2001/07/10 03:15:20 1.4
@@ -17,8 +17,10 @@
<a href="bug.php?op=add">Enter Bug</a> |
<a href="query.php?op=query">Query Bugs</a> |
<a href="report.php">Reporting</a> |
- <a href="user.php">Personal Page</a> |
- <a href="logout.php">Logout {loggedinas}</a>
+ <a href="user.php">Personal Page</a>
+ <!-- BEGIN logoutblock -->
+ | <a href="logout.php">Logout {loggedinas}</a>
+ <!-- END logoutblock -->
]
</font>
</td>
|
|
From: Benjamin C. <bc...@us...> - 2001-07-10 03:15:23
|
Update of /cvsroot/phpbt/phpbt/admin/templates
In directory usw-pr-cvs1:/tmp/cvs-serv10698/admin/templates
Modified Files:
wrap.html
Log Message:
Get rid of the logout link entirely if not logged in
Index: wrap.html
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/templates/wrap.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- wrap.html 2001/06/30 16:45:36 1.3
+++ wrap.html 2001/07/10 03:15:20 1.4
@@ -17,8 +17,10 @@
<a href="user.php">Users</a> |
<a href="status.php">Statuses</a> |
<a href="resolution.php">Resolutions</a> |
- <a href="os.php">OSes</a> |
- <a href="../logout.php">Logout {loggedinas}</a>
+ <a href="os.php">OSes</a>
+ <!-- BEGIN logoutblock -->
+ | <a href="../logout.php">Logout {loggedinas}</a>
+ <!-- END logoutblock -->
]
</font>
</td>
|
|
From: Benjamin C. <bc...@us...> - 2001-07-10 03:15:23
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv10698
Modified Files:
include.php
Log Message:
Get rid of the logout link entirely if not logged in
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- include.php 2001/07/02 03:20:50 1.8
+++ include.php 2001/07/10 03:15:20 1.9
@@ -121,13 +121,22 @@
}
class templateclass extends Template {
- function pparse($target, $handle, $append = false) {
- global $auth;
-
- $this->set_var('loggedinas', $auth->auth['uid'] ? $auth->auth['email'] : '');
- print $this->finish($this->parse($target, $handle, $append));
- return false;
- }
+ function pparse($target, $handle, $append = false) {
+ global $auth;
+
+ $this->set_block('wrap', 'logoutblock', 'lblock');
+ if ($auth->auth['uid']) {
+ $this->set_var('loggedinas', $auth->auth['email']);
+ $this->parse('lblock', 'logoutblock', true);
+ } else {
+ $this->set_var(array(
+ 'loggedinas' => '',
+ 'lblock' => ''
+ ));
+ }
+ print $this->finish($this->parse($target, $handle, $append));
+ return false;
+ }
}
$t = new templateclass('templates','keep');
@@ -136,9 +145,9 @@
'me' => $PHP_SELF,
'error' => '',
'cssfile' => $cssfile));
-
+
// End classes -- Begin helper functions
-
+
///
/// Show text to the browser - escape hatch
function show_text($text, $iserror = false) {
|
|
From: Benjamin C. <bc...@us...> - 2001-07-02 03:20:52
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv2259
Modified Files:
include.php
Log Message:
List specifically which phplib files are required
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- include.php 2001/06/30 16:45:36 1.7
+++ include.php 2001/07/02 03:20:50 1.8
@@ -4,13 +4,21 @@
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...');
-include 'prepend.php3';
-include 'template.inc';
+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';
+
// Localization - include the file with the desired language
include INSTALLPATH.'/strings-en.php';
|
|
From: Benjamin C. <bc...@us...> - 2001-07-02 00:55:27
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv9196
Modified Files:
bug.php
Log Message:
Code cleanup
Index: bug.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/bug.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- bug.php 2001/06/30 16:45:36 1.8
+++ bug.php 2001/07/02 00:55:24 1.9
@@ -6,7 +6,7 @@
page_open(array('sess' => 'usess', 'auth' => 'uauth', 'perm' => 'uperm'));
-$u = $auth->auth[uid];
+$u = $auth->auth['uid'];
///
/// Send the email about changes to the bug and (later) log the changes in the DB
@@ -47,30 +47,30 @@
// Reporter never changes;
$reporter = $q->grab_field("select Email from User where UserID =
- $buginfo[CreatedBy]");
+ {$buginfo['CreatedBy']}");
$reporterstat = ' ';
$assignedto = $q->grab_field("select Email from User where UserID = ".
- ($cf[AssignedTo] ? $cf[AssignedTo] : $buginfo[AssignedTo]));
- $assignedtostat = $cf[AssignedTo] ? '!' : ' ';
+ ($cf['AssignedTo'] ? $cf['AssignedTo'] : $buginfo['AssignedTo']));
+ $assignedtostat = $cf['AssignedTo'] ? '!' : ' ';
// If there are new comments grab the comments immediately before the latest
if ($comments) {
$q->query("select u.Email, c.Text, c.CreatedDate from Comment c, User u where
- BugID = $buginfo[BugID] and c.CreatedBy = u.UserID order by CreatedDate
+ BugID = {$buginfo['BugID']} and c.CreatedBy = u.UserID order by CreatedDate
desc limit 2");
$row = $q->grab();
$t->set_var(array(
- 'newpostedby' => $row[Email],
- 'newpostedon' => date(TIMEFORMAT,$row[CreatedDate]).' on '.
- date(DATEFORMAT,$row[CreatedDate]),
- 'newcomments' => textwrap('+ '.stripslashes($row[Text]),72,"\n+ ")
+ 'newpostedby' => $row['Email'],
+ 'newpostedon' => date(TIMEFORMAT, $row['CreatedDate']).' on '.
+ date(DATEFORMAT, $row['CreatedDate']),
+ 'newcomments' => textwrap('+ '.stripslashes($row['Text']),72,"\n+ ")
));
// 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.CreatedDate,
b.Description from Bug b, User u where b.CreatedBy = u.UserID and
- BugID = $buginfo[BugID]");
+ BugID = {$buginfo['BugID']}");
$t->set_var(array(
'oldpostedby' => $by,
'oldpostedon' => date(TIMEFORMAT,$on).' on '.date(DATEFORMAT,$on),
@@ -79,28 +79,28 @@
} else {
$row = $q->grab();
$t->set_var(array(
- 'oldpostedby' => $row[Email],
- 'oldpostedon' => date(TIMEFORMAT,$row[CreatedDate]).' on '.
- date(DATEFORMAT,$row[CreatedDate]),
- 'oldcomments' => textwrap(stripslashes($row[Text]),72)
+ 'oldpostedby' => $row['Email'],
+ 'oldpostedon' => date(TIMEFORMAT,$row['CreatedDate']).' on '.
+ date(DATEFORMAT,$row['CreatedDate']),
+ 'oldcomments' => textwrap(stripslashes($row['Text']),72)
));
}
}
// Don't email the person who just made the changes (later, make this
// behavior toggable by the user)
- if ($userid != $buginfo[CreatedBy])
+ if ($userid != $buginfo['CreatedBy'])
$maillist[] = $reporter;
- if ($userid != ($cf[AssignedTo] ? $cf[AssignedTo] : $buginfo[AssignedTo]))
+ if ($userid != ($cf['AssignedTo'] ? $cf['AssignedTo'] : $buginfo['AssignedTo']))
$maillist[] = $assignedto;
// Leter add a watcher (such as QA person) check here
$toemail = join(', ',$maillist);
$t->set_var(array(
- 'bugid' => $buginfo[BugID],
- 'url' => INSTALLURL."/bug.php?op=show&bugid=$buginfo[BugID]",
- 'Priority' => $select[priority][($cf[Priority] ? $cf[Priority] : $buginfo[Priority])],
- 'PriorityStat' => $cf[Priority] ? '!' : ' ',
+ 'bugid' => $buginfo['BugID'],
+ 'url' => INSTALLURL."/bug.php?op=show&bugid={$buginfo['BugID']}",
+ 'Priority' => $select['priority'][($cf['Priority'] ? $cf['Priority'] : $buginfo['Priority'])],
+ 'PriorityStat' => $cf['Priority'] ? '!' : ' ',
'Reporter' => $reporter,
'ReporterStat' => $reporterstat,
'AssignedTo' => $assignedto,
@@ -108,8 +108,8 @@
'Comments' => textwrap($oldcomments,72,"\n ")."\n\n+".
textwrap($comments,72,"\n+ ")."\n"
));
- mail($toemail,"[Bug $buginfo[BugID]] Changed - ".
- ($cf[Title] ? $cf[Title] : $buginfo[Title]), $t->parse('main','emailout'),
+ mail($toemail,"[Bug {$buginfo['BugID']}] Changed - ".
+ ($cf['Title'] ? $cf['Title'] : $buginfo['Title']), $t->parse('main','emailout'),
sprintf("From: %s\nReply-To: %s\nErrors-To: %s", ADMINEMAIL, ADMINEMAIL,
ADMINEMAIL));
}
@@ -120,27 +120,27 @@
// Pull bug from database to determine changed fields and for user validation
$buginfo = $q->grab("select * from Bug where BugID = $bugid");
- if ($pv = $GLOBALS[HTTP_POST_VARS]) {
- while (list($k,$v) = each($GLOBALS[HTTP_POST_VARS])) {
+ if ($pv = $GLOBALS['HTTP_POST_VARS']) {
+ while (list($k,$v) = each($GLOBALS['HTTP_POST_VARS'])) {
$$k = $v;
if ($buginfo[$k] and $buginfo[$k] != $v) $changedfields[$k] = $v;
}
}
- if (!($u == $buginfo[AssignedTo] or $u == $buginfo[CreatedBy] or
+ if (!($u == $buginfo['AssignedTo'] or $u == $buginfo['CreatedBy'] or
$perm->have_perm('Manager'))) {
- show_bug($bugid,array('status' => $STRING[bugbadperm]));
+ show_bug($bugid,array('status' => $STRING['bugbadperm']));
return;
}
if ($outcome == 'reassign' and (!$assignedto = $q->grab_field("select UserID
from User where Email = '$reassignto'"))) {
- show_bug($bugid,array('status' => $STRING[nouser]));
+ show_bug($bugid,array('status' => $STRING['nouser']));
return;
}
- if ($lastmodifieddate != $buginfo[LastModifiedDate]) {
- show_bug($bugid, array('status' => $STRING[datecollision]));
+ if ($lastmodifieddate != $buginfo['LastModifiedDate']) {
+ show_bug($bugid, array('status' => $STRING['datecollision']));
return;
}
@@ -157,11 +157,11 @@
case 'reassign' :
if (!$assignedto = $q->grab_field("select UserID
from User where Email = '$reassignto'")) {
- show_bug($bugid,array('status' => $STRING[nouser]));
+ show_bug($bugid,array('status' => $STRING['nouser']));
return;
} else {
$statusfield = 'Assigned';
- $changedfields[AssignedTo] = $assignedto;
+ $changedfields['AssignedTo'] = $assignedto;
break;
}
case 'reassigntocomponent' :
@@ -171,10 +171,10 @@
case 'dupe' :
$changeresolution = true;
if ($dupenum == $bugid) {
- show_bug($bugid,array('status' => $STRING[dupeofself]));
+ show_bug($bugid,array('status' => $STRING['dupeofself']));
return;
} elseif (!$q->grab_field("select BugID from Bug where BugID = $dupenum")) {
- show_bug($bugid,array('status' => $STRING[nobug]));
+ show_bug($bugid,array('status' => $STRING['nobug']));
return;
}
$q->query("insert into Comment (CommentID, BugID, Text, CreatedBy,
@@ -207,7 +207,7 @@
if ($statusfield) {
$status = $q->grab_field("select StatusID
from Status where Name = '$statusfield'");
- $changedfields[Status] = $status;
+ $changedfields['Status'] = $status;
}
if ($URL == 'http://') $URL = '';
elseif ($URL and substr($URL,0,7) != 'http://') $URL = 'http://'.$URL;
@@ -228,12 +228,12 @@
function do_form($bugid = 0) {
global $q, $me, $title, $u, $another, $STRING;
- $pv = $GLOBALS[HTTP_POST_VARS];
+ $pv = $GLOBALS['HTTP_POST_VARS'];
// Validation
- if (!$pv[title] = htmlspecialchars(trim($pv[title])))
- $error = $STRING[givesummary];
- elseif (!$pv[description] = htmlspecialchars(trim($pv[description])))
- $error = $STRING[givedesc];
+ if (!$pv['title'] = htmlspecialchars(trim($pv['title'])))
+ $error = $STRING['givesummary'];
+ elseif (!$pv['description'] = htmlspecialchars(trim($pv['description'])))
+ $error = $STRING['givedesc'];
if ($error) { show_form($bugid, $error); return; }
while (list($k,$v) = each($pv)) $$k = $v;
@@ -247,12 +247,12 @@
Project, Version, Component, OS, BrowserString) values
(".$q->nextid('Bug').", '$title', '$description', '$url', $severity,
$priority, $status, $u, $time, $u, $time, $project, $version,
- $component, '$os', '$GLOBALS[HTTP_USER_AGENT]')");
+ $component, '$os', '{$GLOBALS['HTTP_USER_AGENT']}')");
} else {
$q->query("update Bug set Title='$title', Description='$description',
URL='$url', Severity='$severity', Priority='$priority',
Status=$status, AssignedTo='$assignedto', Project=$project,
- Version=$version, Component=$component, OS='$os', BrowserString='$GLOBALS[HTTP_USER_AGENT]'
+ Version=$version, Component=$component, OS='$os', BrowserString='{$GLOBALS['HTTP_USER_AGENT']}'
LastModifiedBy = $u, LastModifiedDate = $time where BugID = '$bugid'");
}
if ($another) header("Location: $me?op=add&project=$project");
@@ -262,8 +262,8 @@
function show_form($bugid = 0, $error = '') {
global $q, $me, $t, $project, $TITLE;
- if ($GLOBALS[HTTP_POST_VARS])
- while (list($k,$v) = each($GLOBALS[HTTP_POST_VARS])) $$k = $v;
+ if ($GLOBALS['HTTP_POST_VARS'])
+ while (list($k,$v) = each($GLOBALS['HTTP_POST_VARS'])) $$k = $v;
$t->set_file('content','bugform.html');
$projectname = $q->grab_field("select Name from Project where ProjectID = $project");
@@ -271,28 +271,28 @@
$row = $q->grab("select * from Bug where BugID = '$bugid'");
$t->set_var(array(
'bugid' => $bugid,
- 'TITLE' => $TITLE[editbug],
- 'title' => stripslashes($row[Title]),
- 'description' => stripslashes($row[Description]),
- 'url' => $row[URL],
- 'urllabel' => $row[URL] ? "<a href='$row[URL]'>URL</a>" : 'URL',
- 'severity' => build_select('Severity',$row[Severity]),
- 'priority' => build_select('priority',$row[Priority]),
- 'status' => build_select('Status',$row[Status]),
- 'resolution' => build_select('Resolution',$row[Resolution]),
- 'assignedto' => $row[AssignedTo],
- 'createdby' => $row[CreatedBy],
- 'createddate' => date(DATEFORMAT,$row[CreatedDate]),
- 'lastmodifieddate' => $row[LastModifiedDate],
- 'project' => $row[Project],
+ 'TITLE' => $TITLE['editbug'],
+ 'title' => stripslashes($row['Title']),
+ 'description' => stripslashes($row['Description']),
+ 'url' => $row['URL'],
+ 'urllabel' => $row['URL'] ? "<a href='{$row['URL']}'>URL</a>" : 'URL',
+ 'severity' => build_select('Severity',$row['Severity']),
+ 'priority' => build_select('priority',$row['Priority']),
+ 'status' => build_select('Status',$row['Status']),
+ 'resolution' => build_select('Resolution',$row['Resolution']),
+ 'assignedto' => $row['AssignedTo'],
+ 'createdby' => $row['CreatedBy'],
+ 'createddate' => date(DATEFORMAT,$row['CreatedDate']),
+ 'lastmodifieddate' => $row['LastModifiedDate'],
+ 'project' => $row['Project'],
'projectname' => $projectname,
- 'version' => build_select('Version',$row[Version],$row[Project]),
- 'component' => build_select('Component',$row[Component],$row[Project]),
- 'os' => build_select('OS',$row[OS]),
- 'browserstring' => $row[BrowserString]));
+ 'version' => build_select('Version',$row['Version'],$row['Project']),
+ 'component' => build_select('Component',$row['Component'],$row['Project']),
+ 'os' => build_select('OS',$row['OS']),
+ 'browserstring' => $row['BrowserString']));
} else {
$t->set_var(array(
- 'TITLE' => $TITLE[enterbug],
+ 'TITLE' => $TITLE['enterbug'],
'error' => $error,
'bugid' => $bugid,
'title' => stripslashes($title),
@@ -326,7 +326,7 @@
User Reporter on Bug.CreatedBy = Reporter.UserID left join Resolution on
Resolution = ResolutionID where BugID = '$bugid'
and Severity = SeverityID and Status = StatusID")) {
- show_text($STRING[bugbadnum],true);
+ show_text($STRING['bugbadnum'],true);
return;
}
$t->set_file('content','bugdisplay.html');
@@ -338,31 +338,31 @@
$t->set_block('content','crow','closerow');
$t->set_unknowns('remove');
$t->set_var(array(
- 'statuserr' => $error[status] ? $error[status].'<br><br>' : '',
+ 'statuserr' => $error['status'] ? $error['status'].'<br><br>' : '',
'bugid' => $bugid,
- 'TITLE' => "$TITLE[editbug] #$bugid",
- 'title' => stripslashes($row[Title]),
- 'description' => nl2br(stripslashes($row[Description])),
- 'url' => $row[URL],
- 'urllabel' => $row[URL] ? "<a href='$row[URL]'>URL</a>" : 'URL',
- 'severity' => build_select('Severity',$row[Severity]),
- 'priority' => build_select('priority',$row[Priority]),
- 'status' => $row[Status],
- 'resolution' => $row[Resolution],
- 'owner' => $row[Owner] ? "to <a href='mailto:$row[Owner]'>$row[Owner]</a>" : '',
- 'reporter' => $row[Reporter],
- 'createddate' => date(DATEFORMAT,$row[CreatedDate]),
- 'createdtime' => date(TIMEFORMAT,$row[CreatedDate]),
- 'lastmodifieddate' => $row[LastModifiedDate],
- 'project' => build_select('Project',$row[Project]),
- 'projectid' => $row[Project],
- 'version' => build_select('Version',$row[Version],$row[Project]),
- 'component' => build_select('Component',$row[Component],$row[Project]),
- 'os' => build_select('OS',$row[OS]),
- 'browserstring' => $row[BrowserString],
+ 'TITLE' => "{$TITLE['editbug']} #$bugid",
+ 'title' => stripslashes($row['Title']),
+ 'description' => nl2br(stripslashes($row['Description'])),
+ 'url' => $row['URL'],
+ 'urllabel' => $row['URL'] ? "<a href='{$row['URL']}'>URL</a>" : 'URL',
+ 'severity' => build_select('Severity',$row['Severity']),
+ 'priority' => build_select('priority',$row['Priority']),
+ 'status' => $row['Status'],
+ 'resolution' => $row['Resolution'],
+ 'owner' => $row['Owner'] ? "to <a href='mailto:{$row['Owner']}'>{$row['Owner']}</a>" : '',
+ 'reporter' => $row['Reporter'],
+ 'createddate' => date(DATEFORMAT,$row['CreatedDate']),
+ 'createdtime' => date(TIMEFORMAT,$row['CreatedDate']),
+ 'lastmodifieddate' => $row['LastModifiedDate'],
+ 'project' => build_select('Project',$row['Project']),
+ 'projectid' => $row['Project'],
+ 'version' => build_select('Version',$row['Version'],$row['Project']),
+ 'component' => build_select('Component',$row['Component'],$row['Project']),
+ 'os' => build_select('OS',$row['OS']),
+ 'browserstring' => $row['BrowserString'],
'bugresolution' => build_select('Resolution')
));
- switch($row[Status]) {
+ switch($row['Status']) {
case 'Unconfirmed' :
case 'New' :
case 'Reopened' :
@@ -395,10 +395,10 @@
$t->set_var(array(
'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[Text])),
- 'rreporter' => $row[Email],
- 'rcreateddate' => date(TIMEFORMAT,$row[CreatedDate]).' on '.
- date(DATEFORMAT,$row[CreatedDate])
+ "\\1 <a href='$me?op=show&bugid=\\3'>\\2\\3</a>",nl2br($row['Text'])),
+ 'rreporter' => $row['Email'],
+ 'rcreateddate' => date(TIMEFORMAT,$row['CreatedDate']).' on '.
+ date(DATEFORMAT,$row['CreatedDate'])
));
$t->parse('rows','row',true);
}
@@ -411,11 +411,11 @@
$q->query("select * from Project where Active order by Name");
switch ($q->num_rows()) {
case 0 :
- $t->set_var('rows',$STRING[noprojects]);
+ $t->set_var('rows',$STRING['noprojects']);
return;
case 1 :
$row = $q->grab();
- $project = $row[ProjectID];
+ $project = $row['ProjectID'];
show_form();
break;
default :
@@ -424,14 +424,14 @@
while ($row = $q->grab()) {
$t->set_var(array(
- 'id' => $row[ProjectID],
- 'name' => $row[Name],
- 'description' => $row[Description],
- 'date' => date(DATEFORMAT,$row[CreatedDate])
+ 'id' => $row['ProjectID'],
+ 'name' => $row['Name'],
+ 'description' => $row['Description'],
+ 'date' => date(DATEFORMAT,$row['CreatedDate'])
));
$t->parse('rows','row',true);
}
- $t->set_var('TITLE', $TITLE[enterbug]);
+ $t->set_var('TITLE', $TITLE['enterbug']);
}
}
|