From 7d9e6eb91eb32e5ad6e281e982d5024a119070fe Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Fr=C3=A9d=C3=A9rick=20Capovilla?= Date: Wed, 26 Jan 2011 10:11:03 -0500 Subject: [PATCH] Fix a problem when doing an authority search with no sort order --- C4/AuthoritiesMarc.pm | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index 9421be9..cd16dc9 100644 --- a/C4/AuthoritiesMarc.pm +++ b/C4/AuthoritiesMarc.pm @@ -264,8 +264,9 @@ sub SearchAuthorities { '@attr 7=2 @attr 1=Heading 0' :'' ); - $query=($query?"\@or $orderstring $query":"\@or \@attr 1=_ALLRECORDS \@attr 2=103 '' $orderstring "); - + $query=($query?$query:"\@attr 1=_ALLRECORDS \@attr 2=103 ''"); + $query="\@or $orderstring $query" if $orderstring; + $offset=0 unless $offset; my $counter = $offset; $length=10 unless $length; -- 1.5.6.5