[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/search.marc dictionary.pl,1.7,1.8
From: |
doXulting |
Subject: |
[Koha-cvs] CVS: koha/search.marc dictionary.pl,1.7,1.8 |
Date: |
Fri, 26 Aug 2005 05:19:01 -0700 |
Update of /cvsroot/koha/koha/search.marc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23954/search.marc
Modified Files:
dictionary.pl
Log Message:
Correct a bug that prevents selectionning an entry with a quote
Index: dictionary.pl
===================================================================
RCS file: /cvsroot/koha/koha/search.marc/dictionary.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** dictionary.pl 20 Jun 2005 14:36:44 -0000 1.7
--- dictionary.pl 26 Aug 2005 12:18:59 -0000 1.8
***************
*** 117,123 ****
--- 117,131 ----
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
***************
*** 131,134 ****
--- 139,145 ----
my @taglist=split /,/,$listtags;
foreach my $curtag (@taglist){
+ # regexp used to prevent errors if user puts spaces in
"search also" of the framework description.
+
+ $curtag =~s/\s+//;
$strsth.="(tagfield='".substr($curtag,1,3)."' AND
tagsubfield='".substr($curtag,4,1)."') OR";
}
***************
*** 149,152 ****
--- 160,173 ----
my ($curauthresults,$nbresults) =
authoritysearch($dbh,[''],[''],[''],['contains'],
address@hidden,$startfrom*$resultsperpage,
$resultsperpage,$authtypecode);
+
+
+ if (defined(@$curauthresults)) {
+ my $taille = @$curauthresults;
+ for (my $i = 0; $i < @$curauthresults ;$i++) {
+ @$curauthresults[$i]->{jamainentry} =
@$curauthresults[$i]->{mainentry};
+ @$curauthresults[$i]->{jamainentry} =~
s/'/\\'/g;
+ }
+ }
+
push @authresults, @$curauthresults;
$authnbresults+=$nbresults;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/search.marc dictionary.pl,1.7,1.8,
doXulting <=