|
From: Benjamin C. <bc...@us...> - 2001-09-03 17:20:19
|
Update of /cvsroot/phpbt/phpbt/admin
In directory usw-pr-cvs1:/tmp/cvs-serv25666
Modified Files:
component.php os.php project.php resolution.php severity.php
status.php version.php
Log Message:
Use the table constants for nextid()
Index: component.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/component.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- component.php 2001/09/01 15:44:20 1.11
+++ component.php 2001/09/03 17:20:16 1.12
@@ -39,7 +39,7 @@
if (!$owner) $owner = 0;
if (!$active) $active = 0;
if (!$componentid) {
- $q->query("insert into component (component_id, project_id, component_name, component_desc, owner, active, created_by, created_date, last_modified_by, last_modified_date) values (".$q->nextid('component ').", $projectid, '$name', '$description', $owner, $active, $u, $time, $u, $time)");
+ $q->query("insert into ".TBL_COMPONENT." (component_id, project_id, component_name, component_desc, owner, active, created_by, created_date, last_modified_by, last_modified_date) values (".$q->nextid(TBL_COMPONENT).", $projectid, '$name', '$description', $owner, $active, $u, $time, $u, $time)");
} else {
$q->query("update ".TBL_COMPONENT." set component_name = '$name', component_desc = '$description', owner = $owner, active = $active, last_modified_by = $u, last_modified_date = $time where component_id = '$componentid'");
}
Index: os.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/os.php,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- os.php 2001/09/01 15:44:20 1.11
+++ os.php 2001/09/03 17:20:16 1.12
@@ -34,7 +34,7 @@
if ($error) { list_items($osid, $error); return; }
if (!$osid) {
- $q->query("insert into ".TBL_OS." (os_id, os_name, regex, sort_order) values (".$q->nextid('os').", '$fname', '$fregex', '$fsortorder')");
+ $q->query("insert into ".TBL_OS." (os_id, os_name, regex, sort_order) values (".$q->nextid(TBL_OS).", '$fname', '$fregex', '$fsortorder')");
} else {
$q->query("update ".TBL_OS." set os_name = '$fname', regex = '$fregex', sort_order = '$fsortorder' where os_id = '$osid'");
}
Index: project.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/project.php,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- project.php 2001/09/01 15:44:20 1.14
+++ project.php 2001/09/03 17:20:16 1.15
@@ -39,11 +39,11 @@
if (!$active) $active = 0;
if (!$projectid) {
- $projectid = $q->nextid('project');
+ $projectid = $q->nextid(TBL_PROJECT);
$q->query("insert into ".TBL_PROJECT." (project_id, project_name, project_desc, active, created_by, created_date)"
." values ($projectid , '$name', '$description', $active, $u, $now)");
$q->query("insert into ".TBL_VERSION." (version_id, project_id, version_name, active, created_by, created_date)"
- ." values (".$q->nextid('version').", $projectid, '$version', $active, $u, $now)");
+ ." values (".$q->nextid(TBL_VERSION).", $projectid, '$version', $active, $u, $now)");
$location = "component.php?op=add&projectid=$projectid";
} else {
$q->query("update ".TBL_PROJECT." set project_name = '$name', project_desc = '$description', active = $active where project_id = $projectid");
Index: resolution.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/resolution.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- resolution.php 2001/09/01 15:44:20 1.12
+++ resolution.php 2001/09/03 17:20:16 1.13
@@ -37,7 +37,7 @@
if (!$resolutionid) {
$q->query("insert into ".TBL_RESOLUTION." (resolution_id, resolution_name, resolution_desc, sort_order)"
- ." values (".$q->nextid('resolution').", '$fname', '$fdescription', '$fsortorder')");
+ ." values (".$q->nextid(TBL_RESOLUTION).", '$fname', '$fdescription', '$fsortorder')");
} else {
$q->query("update ".TBL_RESOLUTION." set resolution_name = '$fname', resolution_desc = '$fdescription', sort_order = '$fsortorder' where resolution_id = '$resolutionid'");
}
Index: severity.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/severity.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- severity.php 2001/09/01 15:44:20 1.5
+++ severity.php 2001/09/03 17:20:16 1.6
@@ -36,7 +36,7 @@
if ($error) { list_items($severityid, $error); return; }
if (!$severityid) {
- $q->query("insert into ".TBL_SEVERITY." (severity_id, severity_name, severity_desc, sort_order, severity_color) values (".$q->nextid('severity').", '$fname', '$fdescription', '$fsortorder', '$fcolor')");
+ $q->query("insert into ".TBL_SEVERITY." (severity_id, severity_name, severity_desc, sort_order, severity_color) values (".$q->nextid(TBL_SEVERITY).", '$fname', '$fdescription', '$fsortorder', '$fcolor')");
} else {
$q->query("update ".TBL_SEVERITY." set severity_name = '$fname', severity_desc = '$fdescription', sort_order = '$fsortorder', severity_color = '$fcolor' where severity_id = '$severityid'");
}
Index: status.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/status.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- status.php 2001/09/01 15:44:20 1.12
+++ status.php 2001/09/03 17:20:16 1.13
@@ -36,7 +36,7 @@
if ($error) { list_items($statusid, $error); return; }
if (!$statusid) {
- $q->query("insert into ".TBL_STATUS." (status_id, status_name, status_desc, sort_order) values (".$q->nextid('status').", '$fname', '$fdescription', '$fsortorder')");
+ $q->query("insert into ".TBL_STATUS." (status_id, status_name, status_desc, sort_order) values (".$q->nextid(TBL_STATUS).", '$fname', '$fdescription', '$fsortorder')");
} else {
$q->query("update ".TBL_STATUS." set status_name = '$fname', status_desc = '$fdescription', sort_order = '$fsortorder' where status_id = '$statusid'");
}
Index: version.php
===================================================================
RCS file: /cvsroot/phpbt/phpbt/admin/version.php,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- version.php 2001/09/01 15:44:20 1.12
+++ version.php 2001/09/03 17:20:16 1.13
@@ -35,7 +35,7 @@
if (!$active) $active = 0;
if (!$versionid) {
- $q->query("insert into ".TBL_VERSION." (version_id, project_id, version_name, active, created_by, created_date) values (".$q->nextid('version').", $projectid, '$version', '$active', $u, $now)");
+ $q->query("insert into ".TBL_VERSION." (version_id, project_id, version_name, active, created_by, created_date) values (".$q->nextid(TBL_VERSION).", $projectid, '$version', '$active', $u, $now)");
} else {
$q->query("update ".TBL_VERSION." set project_id = $projectid, version_name = '$version', active = '$active' where version_id = '$versionid'");
}
|