Keywords were already enforced to never differ only in capitalization. So, changed the code so that case no longer matters when typing in the name of a keyword.

This commit is contained in:
terry%mozilla.org 2000-07-13 20:04:15 +00:00
Родитель 37f23ee639
Коммит 167f735bc2
3 изменённых файлов: 12 добавлений и 5 удалений

Просмотреть файл

@ -36,7 +36,6 @@ sub sillyness {
$zz = $::unconfirmedstate;
$zz = @::components;
$zz = @::default_column_list;
$zz = @::keywordsbyname;
$zz = @::legal_keywords;
$zz = @::legal_platform;
$zz = @::legal_priority;
@ -405,7 +404,7 @@ sub GenerateSQL {
if ($value eq '') {
next;
}
my $id = $::keywordsbyname{$value};
my $id = GetKeywordIdFromName($name);
if ($id) {
push(@list, "$table.keywordid = $id");
} else {

Просмотреть файл

@ -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.

Просмотреть файл

@ -37,7 +37,6 @@ use vars %::versions,
%::components,
%::COOKIE,
%::MFORM,
%::keywordsbyname,
%::legal_keywords,
%::legal_opsys,
%::legal_platform,
@ -549,7 +548,7 @@ if ($::FORM{'keywords'}) {
if ($keyword eq '') {
next;
}
my $i = $::keywordsbyname{$keyword};
my $i = GetKeywordIdFromName($keyword);
if (!$i) {
PuntTryAgain("Unknown keyword named <code>$keyword</code>. " .
"<P>The legal keyword names are " .