summaryrefslogtreecommitdiffstats
path: root/globals.pl
diff options
context:
space:
mode:
authorbbaetz%student.usyd.edu.au <>2002-08-10 16:34:16 +0200
committerbbaetz%student.usyd.edu.au <>2002-08-10 16:34:16 +0200
commit61890499431396f3209e0a135122a1af507364f6 (patch)
tree1093ecab3cc9ff51fcb809b026f1eeb4a4eaada9 /globals.pl
parent159185ae7e3b382a9acd850e7709834a5ebffb03 (diff)
downloadbugzilla-61890499431396f3209e0a135122a1af507364f6.tar.gz
bugzilla-61890499431396f3209e0a135122a1af507364f6.tar.xz
Bug 161865 - GetFieldID shouldn't INSERT into the fielddefs table
r=joel x2
Diffstat (limited to 'globals.pl')
-rw-r--r--globals.pl7
1 files changed, 1 insertions, 6 deletions
diff --git a/globals.pl b/globals.pl
index ec57bffb2..cdaf84512 100644
--- a/globals.pl
+++ b/globals.pl
@@ -349,12 +349,7 @@ sub GetFieldID {
my ($f) = (@_);
SendSQL("SELECT fieldid FROM fielddefs WHERE name = " . SqlQuote($f));
my $fieldid = FetchOneColumn();
- if (!$fieldid) {
- my $q = SqlQuote($f);
- SendSQL("REPLACE INTO fielddefs (name, description) VALUES ($q, $q)");
- SendSQL("SELECT LAST_INSERT_ID()");
- $fieldid = FetchOneColumn();
- }
+ die "Unknown field id: $f" if !$fieldid;
return $fieldid;
}