[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/C4 Koha.pm
From: |
Tumer Garip |
Subject: |
[Koha-cvs] koha/C4 Koha.pm |
Date: |
Mon, 02 Oct 2006 19:15:20 +0000 |
CVSROOT: /sources/koha
Module name: koha
Changes by: Tumer Garip <tgarip1957> 06/10/02 19:15:20
Modified files:
C4 : Koha.pm
Log message:
code changed to show facets labels in different languages. Lacks the
tools to create and fill the table yet
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/C4/Koha.pm?cvsroot=koha&r1=1.45&r2=1.46
Patches:
Index: Koha.pm
===================================================================
RCS file: /sources/koha/koha/C4/Koha.pm,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- Koha.pm 1 Oct 2006 21:48:54 -0000 1.45
+++ Koha.pm 2 Oct 2006 19:15:20 -0000 1.46
@@ -17,15 +17,16 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: Koha.pm,v 1.45 2006/10/01 21:48:54 tgarip1957 Exp $
+# $Id: Koha.pm,v 1.46 2006/10/02 19:15:20 tgarip1957 Exp $
use strict;
require Exporter;
use C4::Context;
use C4::Biblio;
+use CGI;
use vars qw($VERSION @ISA @EXPORT);
-$VERSION = do { my @v = '$Revision: 1.45 $' =~ /\d+/g; shift(@v) . "." .
join("_", map {sprintf "%03d", $_ } @v); };
+$VERSION = do { my @v = '$Revision: 1.46 $' =~ /\d+/g; shift(@v) . "." .
join("_", map {sprintf "%03d", $_ } @v); };
=head1 NAME
@@ -915,9 +916,12 @@
sub getFacets {
###Subfields is an array as well although MARC21 has them all in "a" in case
UNIMARC has differing subfields
my $dbh=C4::Context->dbh;
+my $query=new CGI;
+my $lang=$query->cookie('KohaOpacLanguage');
+$lang="en" unless $lang;
my @facets;
-my $sth=$dbh->prepare("SELECT facets_label,kohafield FROM facets where
(facets_label<>'' ) group by facets_label");
-my $sth2=$dbh->prepare("SELECT * FROM facets where facets_label=?");
+my $sth=$dbh->prepare("SELECT facets_label_$lang,kohafield FROM facets where
(facets_label_$lang<>'' ) group by facets_label_$lang");
+my $sth2=$dbh->prepare("SELECT * FROM facets where facets_label_$lang=?");
$sth->execute();
while (my ($label,$kohafield)=$sth->fetchrow){
$sth2->execute($label);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/C4 Koha.pm,
Tumer Garip <=