[Koha-patches] [PATCH] [SIGNED-OFF] Bug 5661 Fix a problem when doing an authority search with no sort order
Owen Leonard
oleonard at myacpl.org
Wed Feb 2 22:15:38 CET 2011
From: Frédérick Capovilla <frederick.capovilla at sys-tech.net>
---
C4/AuthoritiesMarc.pm | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/C4/AuthoritiesMarc.pm b/C4/AuthoritiesMarc.pm
index 0abd506..e5808b0 100644
--- a/C4/AuthoritiesMarc.pm
+++ b/C4/AuthoritiesMarc.pm
@@ -266,8 +266,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.7.3
More information about the Koha-patches
mailing list