From f9cbf98a0199387f57863422c06cd6cf8cebd4e0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9rick=20Capovilla?= Date: Wed, 2 Feb 2011 16:17:21 -0500 Subject: [PATCH] Bug 5661 Fix a problem when doing an authority search with no sort order Signed-off-by: Owen Leonard Signed-off-by: Chris Cormack (cherry picked from commit 079796ed189541a0f04126c97e97cad50fb18783) Signed-off-by: Chris Nighswonger --- C4/AuthoritiesMarc.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm index 9421be9f1b..cd16dc9364 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; -- 2.39.5