projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Druckvorlagen: 'Default' entfernt, 'German' in 'Standard' umbenannt
[kivitendo-erp.git]
/
bin
/
mozilla
/
admin.pl
diff --git
a/bin/mozilla/admin.pl
b/bin/mozilla/admin.pl
index
95c0303
..
d2b8fdd
100755
(executable)
--- a/
bin/mozilla/admin.pl
+++ b/
bin/mozilla/admin.pl
@@
-73,9
+73,9
@@
our $form;
our $locale;
our $auth;
our $locale;
our $auth;
-my @valid_dateformats = qw(mm
-dd-yy mm/dd/yy dd-mm-
yy dd/mm/yy dd.mm.yy yyyy-mm-dd);
+my @valid_dateformats = qw(mm
/dd/
yy dd/mm/yy dd.mm.yy yyyy-mm-dd);
my @valid_numberformats = ('1,000.00', '1000.00', '1.000,00', '1000,00');
my @valid_numberformats = ('1,000.00', '1000.00', '1.000,00', '1000,00');
-my @all_stylesheets = qw(lx-office-erp.css Win2000.css);
+my @all_stylesheets = qw(lx-office-erp.css Win2000.css
Mobile.css kivitendo.css
);
my @all_menustyles = (
{ id => 'old', title => $::locale->text('Old (on the side)') },
{ id => 'v3', title => $::locale->text('Top (CSS)') },
my @all_menustyles = (
{ id => 'old', title => $::locale->text('Old (on the side)') },
{ id => 'v3', title => $::locale->text('Top (CSS)') },
@@
-91,20
+91,19
@@
sub run {
$locale = $::locale;
$auth = $::auth;
$locale = $::locale;
$auth = $::auth;
- $::auth->store_root_credentials_in_session($form->{rpw}) if $session_result == SL::Auth->SESSION_OK;
-
- $form->{stylesheet} = "lx-office-erp.css";
+ $::request->{layout} = SL::Layout::Dispatcher->new(style => 'admin');
+ $::request->{layout}->use_stylesheet("lx-office-erp.css");
$form->{favicon} = "favicon.ico";
if ($form->{action}) {
$form->{favicon} = "favicon.ico";
if ($form->{action}) {
- if ($auth->authenticate_root($form->{rpw}) != $auth->OK()) {
+ if ($auth->authenticate_root($form->{'{AUTH}admin_password'}) != $auth->OK()) {
+ $auth->punish_wrong_login;
$form->{error_message} = $locale->text('Incorrect Password!');
$form->{error_message} = $locale->text('Incorrect Password!');
- $auth->delete_session_value('
rpw
');
+ $auth->delete_session_value('
admin_password
');
adminlogin();
} else {
if ($auth->session_tables_present()) {
adminlogin();
} else {
if ($auth->session_tables_present()) {
- $::auth->store_root_credentials_in_session($::form->{rpw});
- delete $::form->{rpw};
+ delete $::form->{'{AUTH}admin_password'};
_apply_dbupgrade_scripts();
}
_apply_dbupgrade_scripts();
}
@@
-148,6
+147,8
@@
sub check_auth_db_and_tables {
map { $params{"db_${_}"} = $main::auth->{DB_config}->{$_} } keys %{ $auth->{DB_config} };
map { $params{"db_${_}"} = $main::auth->{DB_config}->{$_} } keys %{ $auth->{DB_config} };
+ $params{admin_password} = $::lx_office_conf{authentication}->{admin_password};
+
if (!$main::auth->check_database()) {
$form->{title} = $locale->text('Authentification database creation');
$form->header();
if (!$main::auth->check_database()) {
$form->{title} = $locale->text('Authentification database creation');
$form->header();
@@
-197,7
+198,7
@@
sub create_auth_tables {
my $locale = $main::locale;
$main::auth->create_tables();
my $locale = $main::locale;
$main::auth->create_tables();
- $main::auth->set_session_value('
rpw', $form->{rpw
});
+ $main::auth->set_session_value('
admin_password', $form->{'{AUTH}admin_password'
});
$main::auth->create_or_refresh_session();
my $memberfile = $::lx_office_conf{paths}->{memberfile};
$main::auth->create_or_refresh_session();
my $memberfile = $::lx_office_conf{paths}->{memberfile};
@@
-703,7
+704,7
@@
sub dbupdate {
my $form = $main::form;
my $locale = $main::locale;
my $form = $main::form;
my $locale = $main::locale;
- $
form->{stylesheet} = "lx-office-erp.css"
;
+ $
::request->{layout}->use_stylesheet("lx-office-erp.css")
;
$form->{title} = $locale->text("Dataset upgrade");
$form->header();
$form->{title} = $locale->text("Dataset upgrade");
$form->header();
@@
-1210,10
+1211,7
@@
sub _search_templates {
my @allmaster = readdir(TEMPLATEDIR);
closedir TEMPLATEDIR;
my @allmaster = readdir(TEMPLATEDIR);
closedir TEMPLATEDIR;
- @allmaster = sort grep { -d ("$::lx_office_conf{paths}->{templates}/print" . "/$_") && !/^\.\.?$/ } @allmaster;
- @allmaster = reverse grep !/Default/, @allmaster;
- push @allmaster, 'Default';
- @allmaster = reverse @allmaster;
+ @allmaster = ('Standard', sort grep { -d ("$::lx_office_conf{paths}->{templates}/print" . "/$_") && !/^\.\.?$/ && !/^Standard$/ } @allmaster);
return \@alldir, \@allmaster;
}
return \@alldir, \@allmaster;
}