# 2004-12-13 Nick.Barnes@pobox.com bug 262268
# Check flag type names for spaces and commas, and rename them.
if (TableExists("flagtypes")) {
- print "Checking flag type names for spaces and commas...\n" unless $silent;
-
# Get names and IDs which are broken.
$sth = $dbh->prepare("SELECT name, id FROM flagtypes");
$sth->execute();
}
}
if (@badflagnames) {
+ print "Removing spaces and commas from flag names...\n";
my ($flagname, $tryflagname);
my $sth = $dbh->prepare("UPDATE flagtypes SET name = ? WHERE id = ?");
foreach $flagname (@badflagnames) {
delete $flagtypes{$flagname};
}
print "... done.\n";
- } else {
- print "... all flag type names are good.\n" unless $silent;
}
}