Commit a037f115 authored by travis%sedsystems.ca's avatar travis%sedsystems.ca

Bug 277571 : checksetup should not always output a message about checking for flags

Patch by Max K-A <mkanat@kerio.com> r=vladd a=justdave
parent 16101ff8
...@@ -3886,8 +3886,6 @@ if (TableExists("attachstatuses") && TableExists("attachstatusdefs")) { ...@@ -3886,8 +3886,6 @@ if (TableExists("attachstatuses") && TableExists("attachstatusdefs")) {
# 2004-12-13 Nick.Barnes@pobox.com bug 262268 # 2004-12-13 Nick.Barnes@pobox.com bug 262268
# Check flag type names for spaces and commas, and rename them. # Check flag type names for spaces and commas, and rename them.
if (TableExists("flagtypes")) { if (TableExists("flagtypes")) {
print "Checking flag type names for spaces and commas...\n" unless $silent;
# Get names and IDs which are broken. # Get names and IDs which are broken.
$sth = $dbh->prepare("SELECT name, id FROM flagtypes"); $sth = $dbh->prepare("SELECT name, id FROM flagtypes");
$sth->execute(); $sth->execute();
...@@ -3902,6 +3900,7 @@ if (TableExists("flagtypes")) { ...@@ -3902,6 +3900,7 @@ if (TableExists("flagtypes")) {
} }
} }
if (@badflagnames) { if (@badflagnames) {
print "Removing spaces and commas from flag names...\n";
my ($flagname, $tryflagname); my ($flagname, $tryflagname);
my $sth = $dbh->prepare("UPDATE flagtypes SET name = ? WHERE id = ?"); my $sth = $dbh->prepare("UPDATE flagtypes SET name = ? WHERE id = ?");
foreach $flagname (@badflagnames) { foreach $flagname (@badflagnames) {
...@@ -3926,8 +3925,6 @@ if (TableExists("flagtypes")) { ...@@ -3926,8 +3925,6 @@ if (TableExists("flagtypes")) {
delete $flagtypes{$flagname}; delete $flagtypes{$flagname};
} }
print "... done.\n"; print "... done.\n";
} else {
print "... all flag type names are good.\n" unless $silent;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment