[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha thesaurus_popup.pl,1.13.2.1,1.13.2.2
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha thesaurus_popup.pl,1.13.2.1,1.13.2.2 |
Date: |
Mon, 26 Jan 2004 02:51:12 -0800 |
Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20394
Modified Files:
Tag: rel_2_0
thesaurus_popup.pl
Log Message:
the thesaurus popup can return a complete hierarchy or only the last part of a
thesaurus entry.
Index: thesaurus_popup.pl
===================================================================
RCS file: /cvsroot/koha/koha/thesaurus_popup.pl,v
retrieving revision 1.13.2.1
retrieving revision 1.13.2.2
diff -C2 -r1.13.2.1 -r1.13.2.2
*** thesaurus_popup.pl 8 Jan 2004 17:06:03 -0000 1.13.2.1
--- thesaurus_popup.pl 26 Jan 2004 10:51:10 -0000 1.13.2.2
***************
*** 37,40 ****
--- 37,41 ----
my $result = $input->param('result');
my $search_string= $input->param('search_string');
+ $search_string = $result unless ($search_string);
my $op = $input->param('op');
my $id = $input->param('id');
***************
*** 42,46 ****
my $index= $input->param('index');
my $insert = $input->param('insert');
!
my $dbh = C4::Context->dbh;
--- 43,47 ----
my $index= $input->param('index');
my $insert = $input->param('insert');
! my $nohierarchy = $input->param('nohierarchy'); # if 1, just show the last
part of entry (Marseille). If 0, show everything (Europe -- France --Marseille)
my $dbh = C4::Context->dbh;
***************
*** 52,58 ****
my ($father,$freelib_text) = $sti->fetchrow_array;
if (length($result)>0) {
! $result .= "|$father $freelib_text";
} else {
! $result = "$father $freelib_text";
}
}
--- 53,67 ----
my ($father,$freelib_text) = $sti->fetchrow_array;
if (length($result)>0) {
! if ($nohierarchy) {
! $result .= "|$freelib_text";
! } else {
! $result .= "|$father $freelib_text";
! }
} else {
! if ($nohierarchy) {
! $result = "$freelib_text";
! } else {
! $result = "$father $freelib_text";
! }
}
}
***************
*** 78,82 ****
$sti->execute($search_string,$category);
while (my $line=$sti->fetchrow_hashref) {
! $stdlib{$line->{'id'}} = "$line->{'father'} $line->{'freelib'}";
push(@freelib,$line->{'id'});
}
--- 87,95 ----
$sti->execute($search_string,$category);
while (my $line=$sti->fetchrow_hashref) {
! if ($nohierarchy) {
! $stdlib{$line->{'id'}} = "$line->{'freelib'}";
! } else {
! $stdlib{$line->{'id'}} = "$line->{'father'}
$line->{'freelib'}";
! }
push(@freelib,$line->{'id'});
}
***************
*** 106,110 ****
result => $result,
category => $category,
! index => $index
);
output_html_with_http_headers $input, $cookie, $template->output;
--- 119,124 ----
result => $result,
category => $category,
! index => $index,
! nohierarchy => $nohierarchy,
);
output_html_with_http_headers $input, $cookie, $template->output;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha thesaurus_popup.pl,1.13.2.1,1.13.2.2,
Paul POULAIN <=