$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;
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());
$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 (<HTACCESS>) {
- ($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 (<HTACCESS>) {
- ($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|.*/||;