summaryrefslogtreecommitdiffstats
path: root/globals.pl
diff options
context:
space:
mode:
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;
}