From 91206d185c93d42a2bc741454d0f8e3aa17492fa Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Wed, 25 Aug 2010 09:51:21 +0200 Subject: [PATCH] Bug 3630 Impossible to perform Scan Indexes search This is a quick fix. The way scan indexes performs should be improved in 3.4. There are several issues: - No paging - The interface is the same as for biblio records search result and so is unusable: for example you have a button to place a hold or you can sort by Popularity which is irrelevant for index terms. Signed-off-by: Galen Charlton --- C4/Search.pm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/C4/Search.pm b/C4/Search.pm index 2cc2dfb671..d36459a803 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1426,12 +1426,11 @@ sub searchResults { # loop through all of the records we've retrieved for ( my $i = $offset ; $i <= $times - 1 ; $i++ ) { my $marcrecord = MARC::File::USMARC::decode( $marcresults[$i] ); - if ($bibliotag<10){ - $fw = GetFrameworkCode($marcrecord->field($bibliotag)->data); - }else{ - $fw = GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf)); - } - + $fw = $scan + ? undef + : $bibliotag < 10 + ? GetFrameworkCode($marcrecord->field($bibliotag)->data) + : GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf)); my $oldbiblio = TransformMarcToKoha( $dbh, $marcrecord, $fw ); $oldbiblio->{subtitle} = GetRecordValue('subtitle', $marcrecord, $fw); $oldbiblio->{result_number} = $i + 1; -- 2.39.5