Permalink
Browse files

don't set maintenance mode on a site that is at the correct version

  • Loading branch information...
1 parent 21546e1 commit dae3fce36200ad13638777ae0340477dd12d91ff @haarg haarg committed Apr 16, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/WebGUI/Upgrade.pm
View
@@ -237,14 +237,14 @@ sub upgradeSite {
my $fromVersion = $self->getCurrentVersion($configFile);
my $toVersion = $self->getCodeVersion;
my @steps = $self->calcUpgradePath($fromVersion, $toVersion);
- if ( $self->useMaintenanceMode ) {
- my $dbh = $self->dbhForConfig( $configFile );
- $dbh->do('REPLACE INTO settings (name, value) VALUES (?, ?)', {}, 'upgradeState', 'started');
- }
if (! @steps) {
print "No upgrades needed.\n"
if ! $self->quiet;
}
+ elsif ( $self->useMaintenanceMode ) {
+ my $dbh = $self->dbhForConfig( $configFile );
+ $dbh->do('REPLACE INTO settings (name, value) VALUES (?, ?)', {}, 'upgradeState', 'started');
+ }
my $i = 0;
for my $step ( @steps ) {
$i++;

0 comments on commit dae3fce

Please sign in to comment.