summaryrefslogtreecommitdiffstats
path: root/globals.pl
diff options
context:
space:
mode:
Diffstat (limited to 'globals.pl')
-rw-r--r--globals.pl11
1 files changed, 10 insertions, 1 deletions
diff --git a/globals.pl b/globals.pl
index 91ef44cee..58942ba01 100644
--- a/globals.pl
+++ b/globals.pl
@@ -104,7 +104,7 @@ sub SyncAnyPendingShadowChanges {
$shadowchanges = 0;
}
}
-
+
my $dosqllog = (-e "data/sqllog") && (-w "data/sqllog");
@@ -472,6 +472,7 @@ sub GenerateVersionTable {
SendSQL("SELECT id, name FROM keyworddefs ORDER BY name");
while (MoreSQLData()) {
my ($id, $name) = FetchSQLData();
+ $name = lc($name);
$::keywordsbyname{$name} = $id;
push(@::legal_keywords, $name);
}
@@ -485,6 +486,14 @@ sub GenerateVersionTable {
}
+sub GetKeywordIdFromName {
+ my ($name) = (@_);
+ $name = lc($name);
+ return $::keywordsbyname{$name};
+}
+
+
+
# Returns the modification time of a file.