From: Moritz Bunkus Date: Wed, 1 Jun 2011 11:49:01 +0000 (+0200) Subject: Ältere RDBO-Versionen kennen 'where' als Alias für 'query' beim Manager nicht X-Git-Tag: release-2.6.3~25^2~4 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=33b0b2ca7b3c467dfadcc94918ba758e425149c0;p=kivitendo-erp.git Ältere RDBO-Versionen kennen 'where' als Alias für 'query' beim Manager nicht --- diff --git a/SL/BackgroundJob/CreatePeriodicInvoices.pm b/SL/BackgroundJob/CreatePeriodicInvoices.pm index 559fd0299..0bbea2d86 100644 --- a/SL/BackgroundJob/CreatePeriodicInvoices.pm +++ b/SL/BackgroundJob/CreatePeriodicInvoices.pm @@ -22,7 +22,7 @@ sub run { my $self = shift; $self->{db_obj} = shift; - my $configs = SL::DB::Manager::PeriodicInvoicesConfig->get_all(where => [ active => 1 ]); + my $configs = SL::DB::Manager::PeriodicInvoicesConfig->get_all(query => [ active => 1 ]); foreach my $config (@{ $configs }) { my $new_end_date = $config->handle_automatic_extension; diff --git a/SL/DB/Chart.pm b/SL/DB/Chart.pm index bda45128c..70019c6fb 100644 --- a/SL/DB/Chart.pm +++ b/SL/DB/Chart.pm @@ -17,7 +17,7 @@ __PACKAGE__->meta->initialize; sub get_active_taxkey { my ($self, $date) = @_; $date ||= DateTime->today_local; - return SL::DB::Manager::TaxKey->get_all(where => [ and => [ chart_id => $self->id, + return SL::DB::Manager::TaxKey->get_all(query => [ and => [ chart_id => $self->id, startdate => { le => $date } ] ], sort_by => "startdate DESC")->[0]; } diff --git a/SL/DB/Manager/BackgroundJob.pm b/SL/DB/Manager/BackgroundJob.pm index 1429a7856..96af86312 100644 --- a/SL/DB/Manager/BackgroundJob.pm +++ b/SL/DB/Manager/BackgroundJob.pm @@ -29,7 +29,7 @@ sub get_all_need_to_run { next_run_at => undef, next_run_at => { le => $now } ] ]); - return $class->get_all(where => [ or => [ @interval_args, @once_args ] ]); + return $class->get_all(query => [ or => [ @interval_args, @once_args ] ]); } 1;