Skip to content

Commit

Permalink
don't set maintenance mode on a site that is at the correct version
Browse files Browse the repository at this point in the history
  • Loading branch information
haarg committed Apr 16, 2012
1 parent 21546e1 commit dae3fce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/WebGUI/Upgrade.pm
Expand Up @@ -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++;
Expand Down

0 comments on commit dae3fce

Please sign in to comment.