From: Moritz Bunkus Date: Fri, 2 Feb 2007 10:35:10 +0000 (+0000) Subject: Funktion "swap_buchungsgruppen" in "swap_sortkeys" umbenannt. X-Git-Tag: release-2.4.2~172 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=652397fced242d39ff1b5700c7fce1cbbaa37d5a;p=kivitendo-erp.git Funktion "swap_buchungsgruppen" in "swap_sortkeys" umbenannt. --- diff --git a/SL/AM.pm b/SL/AM.pm index b3874bdf5..dd59725da 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -1190,22 +1190,22 @@ sub delete_buchungsgruppe { $main::lxdebug->leave_sub(); } -sub swap_buchungsgruppen { +sub swap_sortkeys { $main::lxdebug->enter_sub(); - my ($self, $myconfig, $form) = @_; + my ($self, $myconfig, $form, $table) = @_; # connect to database my $dbh = $form->dbconnect_noauto($myconfig); my $query = qq|SELECT - (SELECT sortkey FROM buchungsgruppen WHERE id = ?) AS sortkey1, - (SELECT sortkey FROM buchungsgruppen WHERE id = ?) AS sortkey2|; + (SELECT sortkey FROM $table WHERE id = ?) AS sortkey1, + (SELECT sortkey FROM $table WHERE id = ?) AS sortkey2|; my @values = ($form->{"id1"}, $form->{"id2"}); my @sortkeys = selectrow_query($form, $dbh, $query, @values); - $query = qq|UPDATE buchungsgruppen SET sortkey = ? WHERE id = ?|; + $query = qq|UPDATE $table SET sortkey = ? WHERE id = ?|; my $sth = $dbh->prepare($query); $sth->execute($sortkeys[1], $form->{"id1"}) || $form->dberror($query . " ($sortkeys[1], $form->{id1})"); diff --git a/bin/mozilla/am.pl b/bin/mozilla/am.pl index ddfa954b0..c336f3a70 100644 --- a/bin/mozilla/am.pl +++ b/bin/mozilla/am.pl @@ -2114,7 +2114,7 @@ sub delete_buchungsgruppe { sub swap_buchungsgruppen { $lxdebug->enter_sub(); - AM->swap_buchungsgruppen(\%myconfig, $form); + AM->swap_sortkeys(\%myconfig, $form, "buchungsgruppen"); list_buchungsgruppe(); $lxdebug->leave_sub();