[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/search.marc dictionary.pl search.pl [rel_2_2]
From: |
paul poulain |
Subject: |
[Koha-cvs] koha/search.marc dictionary.pl search.pl [rel_2_2] |
Date: |
Fri, 30 Dec 2005 11:12:28 +0000 |
CVSROOT: /cvsroot/koha
Module name: koha
Branch: rel_2_2
Changes by: paul poulain <address@hidden> 05/12/30 11:12:28
Modified files:
search.marc : dictionary.pl search.pl
Log message:
some minor bugfixes (from doXulting)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/search.marc/dictionary.pl.diff?only_with_tag=rel_2_2&tr1=1.6.2.3&tr2=1.6.2.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/search.marc/search.pl.diff?only_with_tag=rel_2_2&tr1=1.22.2.3&tr2=1.22.2.4&r1=text&r2=text
Patches:
Index: koha/search.marc/dictionary.pl
diff -u koha/search.marc/dictionary.pl:1.6.2.3
koha/search.marc/dictionary.pl:1.6.2.4
--- koha/search.marc/dictionary.pl:1.6.2.3 Fri Jun 17 15:53:35 2005
+++ koha/search.marc/dictionary.pl Fri Dec 30 11:12:28 2005
@@ -116,9 +116,14 @@
$sth->execute($value);
my $total;
my @catresults;
+ my $javalue;
while (my ($value,$ctresults)=$sth->fetchrow) {
-# warn "countresults : ".$ctresults;
+ # This $javalue is used for the javascript selectentry function
(javalue for javascript value !)
+ $javalue = $value;
+ $javalue =~s/'/\\'/g;
+
push @catresults,{value=> $value,
+ javalue=> $javalue,
even=>($total-$startfrom*$resultsperpage)%2,
count=>$ctresults
} if
(($total>=$startfrom*$resultsperpage) and
($total<($startfrom+1)*$resultsperpage));
@@ -130,6 +135,7 @@
foreach my $listtags (@tags){
my @taglist=split /,/,$listtags;
foreach my $curtag (@taglist){
+ $curtag =~s/\s+//;
$strsth.="(tagfield='".substr($curtag,1,3)."' AND
tagsubfield='".substr($curtag,4,1)."') OR";
}
}
@@ -148,6 +154,12 @@
while ((my $authtypecode) = $sth->fetchrow) {
my ($curauthresults,$nbresults) =
authoritysearch($dbh,[''],[''],[''],['contains'],
address@hidden,$startfrom*$resultsperpage,
$resultsperpage,$authtypecode);
+ if (defined(@$curauthresults)) {
+ for (my $i = 0; $i < @$curauthresults ;$i++) {
+ @$curauthresults[$i]->{jamainentry} =
@$curauthresults[$i]->{mainentry};
+ @$curauthresults[$i]->{jamainentry} =~
s/'/\\'/g;
+ }
+ }
push @authresults, @$curauthresults;
$authnbresults+=$nbresults;
# warn "auth : $authtypecode nbauthresults : $nbresults";
Index: koha/search.marc/search.pl
diff -u koha/search.marc/search.pl:1.22.2.3 koha/search.marc/search.pl:1.22.2.4
--- koha/search.marc/search.pl:1.22.2.3 Wed Sep 28 15:48:25 2005
+++ koha/search.marc/search.pl Fri Dec 30 11:12:28 2005
@@ -121,7 +121,15 @@
if ($tag) {
push @tags,$dbh->quote("$tag$subfield");
} else {
- push @tags, $dbh->quote(substr($marc,0,4));
+ if ($marc =~ /^(\d){3}(. -)(.)*/)
+ {
+ # The user is using the search
catalogue part, more fields
+ push @tags,
$dbh->quote(substr($marc,0,4));
+ }
+ else
+ {
+ push @tags, $marc;
+ }
}
} else {
push @tags, "";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/search.marc dictionary.pl search.pl [rel_2_2],
paul poulain <=