[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 SearchMarc.pm [rel_2_2]
From: |
paul poulain |
Subject: |
[Koha-cvs] koha/C4 SearchMarc.pm [rel_2_2] |
Date: |
Tue, 04 Apr 2006 13:32:10 +0000 |
CVSROOT: /cvsroot/koha
Module name: koha
Branch: rel_2_2
Changes by: paul poulain <address@hidden> 06/04/04 13:32:09
Modified files:
C4 : SearchMarc.pm
Log message:
just some tweakings (no changes).
nonfillingchar systempref won't work in UNIMARC (as there is no
indicator to set it)
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/C4/SearchMarc.pm.diff?only_with_tag=rel_2_2&tr1=1.36.2.24&tr2=1.36.2.25&r1=text&r2=text
Patches:
Index: koha/C4/SearchMarc.pm
diff -u koha/C4/SearchMarc.pm:1.36.2.24 koha/C4/SearchMarc.pm:1.36.2.25
--- koha/C4/SearchMarc.pm:1.36.2.24 Thu Feb 23 03:20:24 2006
+++ koha/C4/SearchMarc.pm Tue Apr 4 13:32:08 2006
@@ -335,7 +335,7 @@
push @result,$bibid;
}
}
-if (C4::Context->preference("sortbynonfiling")==1) {
+if (C4::Context->preference("sortbynonfiling")) {
#~~#~~# next part added by SH Modified by JF
# This code resorts the biblio.title results eliminating the
# marc non-filing chars
@@ -351,13 +351,7 @@
#
#
if ($orderby eq "biblio.title") { #don't sort by title if another
orderby is specified
- my $msth = $dbh->prepare("SELECT tagfield, tagsubfield FROM
marc_subfield_structure WHERE kohafield='biblio.title'");
- $msth->execute(); # get MARC tag and subfield that is
mapped to biblio.title
- my $tagdata = $msth->fetchrow_hashref;
- my $tag = $tagdata->{tagfield};
- my $subfieldcode = $tagdata->{tagsubfield};
- $msth->finish;
-
+ my ($tag,$subfieldcode) =
MARCfind_marc_from_kohafield($dbh,'biblio.title','');
my $tsth = $dbh->prepare("SELECT title, tag_indicator FROM
marc_biblio, marc_subfield_table, biblio
WHERE
marc_biblio.bibid = ?
AND
marc_subfield_table.bibid=marc_biblio.bibid
@@ -372,11 +366,11 @@
$tsth->execute($bibidno,$tag,$subfieldcode);
my $titledat = $tsth->fetchrow_hashref;
$sorttitle = lc($titledat->{title});
- #warn "Here's the sorttitle beforehand:".$sorttitle;
+# warn "Here's the sorttitle beforehand:
$titledat->{tag_indicator}=".$sorttitle;
if (length($titledat->{tag_indicator})==2) {
my
$filechar=substr($titledat->{tag_indicator},1,1);
$sorttitle =
substr($sorttitle,$filechar,-1,""); #remove nonfiling characters
- # warn "Here it is afterwards:".$sorttitle;
+# warn "Here it is afterwards:".$sorttitle;
}
$titles{$bibidno} = $sorttitle; #} = $bibidno;
# push @resultnew, $titles{$sorttitle};
- [Koha-cvs] koha/C4 SearchMarc.pm [rel_2_2],
paul poulain <=