# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1335, USA.
return LOGIN_AUTH_DBUPDATE_AVAILABLE() if $dbupdater_auth->unapplied_upgrade_scripts($::auth->dbconnect);
# check if database is down
return LOGIN_AUTH_DBUPDATE_AVAILABLE() if $dbupdater_auth->unapplied_upgrade_scripts($::auth->dbconnect);
# check if database is down
# we got a connection, check the version
my ($dbversion) = $dbh->selectrow_array(qq|SELECT version FROM defaults|);
# we got a connection, check the version
my ($dbversion) = $dbh->selectrow_array(qq|SELECT version FROM defaults|);
my $dbupdater = SL::DBUpgrade2->new(form => $form)->parse_dbupdate_controls;
my @unapplied_scripts = $dbupdater->unapplied_upgrade_scripts($dbh);
my $dbupdater = SL::DBUpgrade2->new(form => $form)->parse_dbupdate_controls;
my @unapplied_scripts = $dbupdater->unapplied_upgrade_scripts($dbh);
foreach my $control (@upgradescripts) {
# Apply upgrade. Control will only return to us if the upgrade has
# been applied correctly and if the update has not requested user
foreach my $control (@upgradescripts) {
# Apply upgrade. Control will only return to us if the upgrade has
# been applied correctly and if the update has not requested user