From f203aa21ad0ff71285b354e5565b7a0ba275dc88 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 12 Jan 2011 15:59:12 +0100 Subject: [PATCH] =?utf8?q?Bessere=20Parameter=C3=BCberpr=C3=BCfung?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Helper/LinkedRecords.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SL/DB/Helper/LinkedRecords.pm b/SL/DB/Helper/LinkedRecords.pm index 05f29a540..c1d31338b 100644 --- a/SL/DB/Helper/LinkedRecords.pm +++ b/SL/DB/Helper/LinkedRecords.pm @@ -14,7 +14,7 @@ sub linked_records { my %params = @_; my $wanted = $params{direction} || croak("Missing parameter `direction'"); - my $myself = $wanted eq 'from' ? 'to' : 'from'; + my $myself = $wanted eq 'from' ? 'to' : $wanted eq 'to' ? 'from' : croak("Invalid parameter `direction'"); my $my_table = SL::DB::Helpers::Mappings::get_table_for_package(ref($self)); -- 2.20.1