X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FAM.pm;h=f5736f14b3fe2146b90ab525ede2d91ba4bc597b;hb=fb1e65086b66bac948150bbc1e8fd6e300c21823;hp=1dbf9d82f5b85364ec00013ac1bdff619b56f587;hpb=8f29628f54e8b6669cdefa6e43e2f54220760c3c;p=kivitendo-erp.git diff --git a/SL/AM.pm b/SL/AM.pm index 1dbf9d82f..f5736f14b 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -1544,42 +1544,6 @@ sub save_preferences { $auth->create_or_refresh_session(); } - if ($webdav) { - my @webdavdirs = - qw(angebote bestellungen rechnungen anfragen lieferantenbestellungen einkaufsrechnungen); - foreach my $directory (@webdavdirs) { - my $file = "webdav/" . $directory . "/webdav-user"; - my $newfile; - if ($myconfig->{$directory}) { - open(HTACCESS, "$file") or die "cannot open webdav-user $!\n"; - while () { - my ($login, $password) = split(/:/, $_); - if ($login ne $form->{login}) { - $newfile .= $_; - } - } - close(HTACCESS); - open(HTACCESS, "> $file") or die "cannot open webdav-user $!\n"; - $newfile .= $myconfig->{login} . ":" . $myconfig->{password} . "\n"; - print(HTACCESS $newfile); - close(HTACCESS); - } else { - $form->{$directory} = 0; - open(HTACCESS, "$file") or die "cannot open webdav-user $!\n"; - while () { - my ($login, $password) = split(/:/, $_); - if ($login ne $form->{login}) { - $newfile .= $_; - } - } - close(HTACCESS); - open(HTACCESS, "> $file") or die "cannot open webdav-user $!\n"; - print(HTACCESS $newfile); - close(HTACCESS); - } - } - } - $main::lxdebug->leave_sub(); return $rc; @@ -1778,7 +1742,7 @@ sub retrieve_units { my ($self, $myconfig, $form, $prefix) = @_; - my $dbh = $form->dbconnect($myconfig); + my $dbh = $form->get_standard_dbh; my $query = "SELECT *, base_unit AS original_base_unit FROM units"; @@ -1818,9 +1782,7 @@ sub retrieve_units { map({ $unit->{"LANGUAGES"}->{$ref->{"template_code"}}->{$_} = $ref->{$_} } keys(%{$ref})); } } - $sth->finish(); - - $dbh->disconnect(); + $sth->finish; $main::lxdebug->leave_sub();