[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.36.2.5,1.36.2.6
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.36.2.5,1.36.2.6 |
Date: |
Mon, 07 Mar 2005 01:49:39 -0800 |
Update of /cvsroot/koha/koha/C4
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9315/C4
Modified Files:
Tag: rel_2_2
SearchMarc.pm
Log Message:
adding asc or desc selector to order a search as the user want (patch from
doXulting for ENSMP)
Index: SearchMarc.pm
===================================================================
RCS file: /cvsroot/koha/koha/C4/SearchMarc.pm,v
retrieving revision 1.36.2.5
retrieving revision 1.36.2.6
diff -C2 -r1.36.2.5 -r1.36.2.6
*** SearchMarc.pm 28 Feb 2005 14:25:19 -0000 1.36.2.5
--- SearchMarc.pm 7 Mar 2005 09:49:06 -0000 1.36.2.6
***************
*** 166,170 ****
sub catalogsearch {
! my ($dbh, $tags, $and_or, $excluding, $operator, $value,
$offset,$length,$orderby) = @_;
# build the sql request. She will look like :
# select m1.bibid
--- 166,170 ----
sub catalogsearch {
! my ($dbh, $tags, $and_or, $excluding, $operator, $value,
$offset,$length,$orderby,$desc_or_asc) = @_;
# build the sql request. She will look like :
# select m1.bibid
***************
*** 189,193 ****
my $any_not = 0;
$orderby = "biblio.title" unless $orderby;
!
#last minute stripping out of ' and ,
# paul : quoting, it's done a few lines lated.
--- 189,193 ----
my $any_not = 0;
$orderby = "biblio.title" unless $orderby;
! $desc_or_asc = "ASC" unless $desc_or_asc;
#last minute stripping out of ' and ,
# paul : quoting, it's done a few lines lated.
***************
*** 277,285 ****
my $sth;
if ($sql_where2) {
! $sth = $dbh->prepare("select distinct m1.bibid from
biblio,biblioitems,marc_biblio,$sql_tables where
biblio.biblionumber=marc_biblio.biblionumber and
biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and
$sql_where2 and ($sql_where1) order by $orderby");
! warn "Q2 : select distinct m1.bibid from
biblio,biblioitems,marc_biblio,$sql_tables where
biblio.biblionumber=marc_biblio.biblionumber and
biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and
$sql_where2 and ($sql_where1) order by $orderby term is @$value";
} else {
! $sth = $dbh->prepare("select distinct m1.bibid from
biblio,biblioitems,marc_biblio,$sql_tables where
biblio.biblionumber=marc_biblio.biblionumber and
biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and
$sql_where1 order by $orderby");
! warn "Q : select distinct m1.bibid from
biblio,biblioitems,marc_biblio,$sql_tables where
biblio.biblionumber=marc_biblio.biblionumber and
biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and
$sql_where1 order by $orderby";
}
$sth->execute();
--- 277,285 ----
my $sth;
if ($sql_where2) {
! $sth = $dbh->prepare("select distinct m1.bibid from
biblio,biblioitems,marc_biblio,$sql_tables where
biblio.biblionumber=marc_biblio.biblionumber and
biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and
$sql_where2 and ($sql_where1) order by $orderby $desc_or_asc");
! warn "Q2 : select distinct m1.bibid from
biblio,biblioitems,marc_biblio,$sql_tables where
biblio.biblionumber=marc_biblio.biblionumber and
biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and
$sql_where2 and ($sql_where1) order by $orderby $desc_or_asc term is @$value";
} else {
! $sth = $dbh->prepare("select distinct m1.bibid from
biblio,biblioitems,marc_biblio,$sql_tables where
biblio.biblionumber=marc_biblio.biblionumber and
biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and
$sql_where1 order by $orderby $desc_or_asc");
! warn "Q : select distinct m1.bibid from
biblio,biblioitems,marc_biblio,$sql_tables where
biblio.biblionumber=marc_biblio.biblionumber and
biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and
$sql_where1 order by $orderby $desc_or_asc";
}
$sth->execute();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/C4 SearchMarc.pm,1.36.2.5,1.36.2.6,
Paul POULAIN <=