X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fadmin.pl;h=42efda84250977e5d44ec8f1b9d147a9a161e007;hb=3e0a049e40f2d68ed4d5f7c623afed5e85b8c017;hp=46f16d79083fdb5ab3fb89f94a69c437f3400068;hpb=44b3c39cbbc125b7e8fb2170c2b621c8ea311b29;p=kivitendo-erp.git diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index 46f16d790..42efda842 100755 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -78,7 +78,7 @@ $form->{stylesheet} = "lx-office-erp.css"; $form->{favicon} = "favicon.ico"; if ($form->{action}) { - if ($auth->authenticate_root($form->{rpw}, 0) != Auth->OK()) { + if ($auth->authenticate_root($form->{rpw}, 0) != $auth->OK()) { $form->{error_message} = $locale->text('Incorrect Password!'); adminlogin(); exit; @@ -88,7 +88,7 @@ if ($form->{action}) { call_sub($locale->findsub($form->{action})); -} elsif ($auth->authenticate_root($form->{rpw}, 0) == Auth->OK()) { +} elsif ($auth->authenticate_root($form->{rpw}, 0) == $auth->OK()) { $auth->create_or_refresh_session() if ($auth->session_tables_present()); @@ -536,44 +536,6 @@ sub save_user { $main::auth->change_password($form->{login}, $form->{new_password}); } - my ($login, $password, $newfile); - if ($main::webdav) { - my @webdavdirs = - qw(angebote bestellungen rechnungen anfragen lieferantenbestellungen einkaufsrechnungen); - foreach my $directory (@webdavdirs) { - my $file = "webdav/" . $directory . "/webdav-user"; - if ($form->{$directory}) { - if (open(HTACCESS, "$file")) { - while () { - ($login, $password) = split(/:/, $_); - if ($login ne $form->{login}) { - $newfile .= $_; - } - } - close(HTACCESS); - } - open(HTACCESS, "> $file") or die "cannot open $file $ERRNO\n"; - $newfile .= $myconfig->{login} . ":" . $myconfig->{password} . "\n"; - print(HTACCESS $newfile); - close(HTACCESS); - } else { - $form->{$directory} = 0; - if (open(HTACCESS, "$file")) { - while () { - ($login, $password) = split(/:/, $_); - if ($login ne $form->{login}) { - $newfile .= $_; - } - } - close(HTACCESS); - } - open(HTACCESS, "> $file") or die "cannot open $file $ERRNO\n"; - print(HTACCESS $newfile); - close(HTACCESS); - } - } - } - $form->{templates} =~ s|.*/||; $form->{templates} = "$main::templates/$form->{templates}"; $form->{mastertemplates} =~ s|.*/||;