|
From: Benjamin C. <bc...@us...> - 2001-08-18 20:11:56
|
Update of /cvsroot/phpbt/phpbt
In directory usw-pr-cvs1:/tmp/cvs-serv5130
Modified Files:
include.php query.php
Log Message:
Changes needed for coloring rows in the query output by severity
Index: include.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/include.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- include.php 2001/08/18 14:14:58 1.31
+++ include.php 2001/08/18 20:11:52 1.32
@@ -35,6 +35,8 @@
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
Index: query.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/query.php,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- query.php 2001/08/17 04:06:06 1.16
+++ query.php 2001/08/18 20:11:52 1.17
@@ -183,7 +183,7 @@
'project' => build_select('project'),
'TITLE' => $TITLE['buglist']));
- $q->query("select bug_id, title, reporter.email as reporter, owner.email as owner, severity_name as severity, bug.created_date, status_name as status, priority_id, version_name as version, component_name as component, resolution_name as resolution from bug, resolution, 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.resolution_id = resolution.resolution_id and 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_id, title, reporter.email as reporter, owner.email as owner, severity_name as severity, bug.created_date, status_name as status, priority_id, version_name as version, component_name as component, resolution_name as resolution, 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");
$headers = array(
'bugid' => 'bug_id',
@@ -211,7 +211,8 @@
while ($row = $q->grab()) {
$t->set_var(array(
- 'bgcolor' => (++$i % 2 == 0) ? '#dddddd' : '#ffffff',
+ 'bgcolor' => USE_SEVERITY_COLOR ? $row['severity_color'] :
+ ((++$i % 2 == 0) ? '#dddddd' : '#ffffff'),
'bugid' => $row['bug_id'],
'title' => $row['title'],
'description' => $row['description'],
|