From aa5bc6d084e607de3ba77af9d80752121e68653b Mon Sep 17 00:00:00 2001 From: tipaul Date: Tue, 4 Mar 2003 16:15:16 +0000 Subject: [PATCH] MARC search fixes and improvements. Now, ALL searches are indexed and should be very fast with any statement. a few improvments, and it will be useable even with a NON-MARC installation of koha. --- koha-tmpl/intranet-tmpl/default/en/intranet-main.tmpl | 6 ++++-- .../intranet-tmpl/default/en/search.marc/result.tmpl | 9 +++------ .../intranet-tmpl/default/en/search.marc/search.tmpl | 12 ++---------- loadmodules.pl | 16 ++++++++++++---- search.marc/search.pl | 5 ++--- 5 files changed, 23 insertions(+), 25 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/default/en/intranet-main.tmpl b/koha-tmpl/intranet-tmpl/default/en/intranet-main.tmpl index a00acde90c..c9cba29649 100644 --- a/koha-tmpl/intranet-tmpl/default/en/intranet-main.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/intranet-main.tmpl @@ -79,7 +79,7 @@ circulation.src ="/images/front-mouseover-circulation -
+ + +
Type in the box and press the enter key.
@@ -111,7 +113,7 @@ circulation.src ="/images/front-mouseover-circulation - diff --git a/koha-tmpl/intranet-tmpl/default/en/search.marc/result.tmpl b/koha-tmpl/intranet-tmpl/default/en/search.marc/result.tmpl index 321062ec57..c5577e309d 100644 --- a/koha-tmpl/intranet-tmpl/default/en/search.marc/result.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/search.marc/result.tmpl @@ -12,19 +12,16 @@
- +
bgcolor=#99cccc background=/images/background-opac.gif - background="/images/background-mem.gif" + bgcolor="#ad11ad" > - - + diff --git a/koha-tmpl/intranet-tmpl/default/en/search.marc/search.tmpl b/koha-tmpl/intranet-tmpl/default/en/search.marc/search.tmpl index 7ac38d620c..c906c9887a 100644 --- a/koha-tmpl/intranet-tmpl/default/en/search.marc/search.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/search.marc/search.tmpl @@ -17,9 +17,10 @@
Biblio#Biblio # Author Title
+ bgcolor="#ad11ad" bgcolor="#99cccc" background="/images/background-opac.gif" - background="/images/background-mem.gif" + bgcolor="#ad11ad" > @@ -34,15 +35,6 @@ - diff --git a/loadmodules.pl b/loadmodules.pl index 8c25ef75c1..58bce25c9a 100755 --- a/loadmodules.pl +++ b/loadmodules.pl @@ -35,7 +35,6 @@ SWITCH: { if ($module eq 'somethingelse') { somethingelse(); last SWITCH; } } - sub acquisitions { my $aq_type = C4::Context->preference("acquisitions") || "normal"; # Get the acquisition preference. This should be: @@ -55,12 +54,21 @@ sub acquisitions { sub catalogue_search { my $marc_p = C4::Context->boolean_preference("marc"); $marc_p = 1 unless defined $marc_p; + my $keyword=$input->param('keyword'); my $query = new CGI; my $type = $query->param('type'); - if ($marc_p) { - print $input->redirect("/cgi-bin/koha/search.marc/search.pl?type=$type"); + if ($keyword) { + if ($marc_p) { + print $input->redirect("/cgi-bin/koha/search.marc/search.pl?type=$type"); + } else { + print $input ->redirect("/cgi-bin/koha/search.pl?keyword=$keyword"); + } } else { - print $input ->redirect("/cgi-bin/koha/catalogue-home.pl"); + if ($marc_p) { + print $input->redirect("/cgi-bin/koha/search.marc/search.pl?type=$type"); + } else { + print $input ->redirect("/cgi-bin/koha/catalogue-home.pl"); + } } } diff --git a/search.marc/search.pl b/search.marc/search.pl index ddb2af55ce..3724e8257c 100755 --- a/search.marc/search.pl +++ b/search.marc/search.pl @@ -35,7 +35,6 @@ use C4::Koha; # XXX subfield_is_koha_internal_p my $query=new CGI; my $type=$query->param('type'); my $op = $query->param('op'); -#$type="opac" unless $type; my $dbh = C4::Context->dbh; @@ -58,8 +57,8 @@ if ($op eq "do_search") { push @tags, substr($marc,0,3); push @subfields, substr($marc,3,1); } - my @results = catalogsearch($dbh, \@tags, \@subfields, \@and_or, - \@excluding, \@operator, \@value, + my @results = catalogsearch($dbh, \@tags, \@subfields, \@and_or, + \@excluding, \@operator, \@value, $startfrom, 20); ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "search.marc/result.tmpl", -- 2.11.0
Search
- bgcolor=#99cccc background=/images/background-opac.gif - - background="/images/background-mem.gif" - - align=center valign=center> - 0 -