$self->create_schema_info_table($form, $dbh);
my $dbupdater = SL::DBUpgrade2->new(form => $form)->parse_dbupdate_controls;
- my $update_available = $dbupdater->update2_available($dbh);
+ my @unapplied_scripts = $dbupdater->unapplied_upgrade_scripts($dbh);
$dbh->disconnect;
- if (!$update_available) {
+ if (!@unapplied_scripts) {
SL::DB::Manager::Employee->update_entries_for_authorized_users;
return LOGIN_OK();
}
$form->{dbupdate} = "db" . $::auth->client->{dbname};
if ($form->{"show_dbupdate_warning"}) {
- print $form->parse_html_template("dbupgrade/warning");
+ print $form->parse_html_template("dbupgrade/warning", { unapplied_scripts => \@unapplied_scripts });
::end_of_request();
}
+{ %{ $_[0] } }
}
+sub get_default_myconfig {
+ my ($self_or_class, %user_config) = @_;
+
+ return (
+ countrycode => 'de',
+ css_path => 'css', # Needed for menunew, see SL::Layout::Base::get_stylesheet_for_user
+ dateformat => 'dd.mm.yy',
+ numberformat => '1.000,00',
+ stylesheet => 'kivitendo.css',
+ timeformat => 'hh:mm',
+ %user_config,
+ );
+}
+
1;