[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/acqui.simple addbiblio.pl,1.21,1.22 additem.pl,1.15
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha/acqui.simple addbiblio.pl,1.21,1.22 additem.pl,1.15,1.16 |
Date: |
Tue, 01 Apr 2003 04:27:49 -0800 |
Update of /cvsroot/koha/koha/acqui.simple
In directory sc8-pr-cvs1:/tmp/cvs-serv12206/acqui.simple
Modified Files:
addbiblio.pl additem.pl
Log Message:
fixes
Index: addbiblio.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/addbiblio.pl,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** addbiblio.pl 7 Mar 2003 16:34:04 -0000 1.21
--- addbiblio.pl 1 Apr 2003 12:27:46 -0000 1.22
***************
*** 48,59 ****
sub find_value {
my ($tagfield,$insubfield,$record) = @_;
! my $result;
my $indicator;
- warn "tagfield : $tagfield /".$record->as_formatted;
if ($tagfield <10) {
if ($record->field($tagfield)) {
! $result = $record->field($tagfield)->data();
} else {
! $result="";
}
} else {
--- 48,58 ----
sub find_value {
my ($tagfield,$insubfield,$record) = @_;
! my @result;
my $indicator;
if ($tagfield <10) {
if ($record->field($tagfield)) {
! push @result, $record->field($tagfield)->data();
} else {
! push @result,"";
}
} else {
***************
*** 62,66 ****
foreach my $subfield (@subfields) {
if (@$subfield[0] eq $insubfield) {
! $result .= @$subfield[1];
$indicator =
$field->indicator(1).$field->indicator(2);
}
--- 61,65 ----
foreach my $subfield (@subfields) {
if (@$subfield[0] eq $insubfield) {
! push @result,@$subfield[1];
$indicator =
$field->indicator(1).$field->indicator(2);
}
***************
*** 68,76 ****
}
}
! return($indicator,$result);
}
! =item find_value
$record = MARCfindbreeding($dbh, $breedingid);
--- 67,75 ----
}
}
! return($indicator,@result);
}
! =item MARCfindbreeding
$record = MARCfindbreeding($dbh, $breedingid);
***************
*** 89,93 ****
if ($marc) {
my $record = MARC::File::USMARC::decode($marc);
- warn "==> ".$record->as_formatted();
if (ref($record) eq undef) {
return -1;
--- 88,91 ----
***************
*** 181,208 ****
next if subfield_is_koha_internal_p($subfield);
next if ($tagslib->{$tag}->{$subfield}->{tab} ne
$tabloop);
- my %subfield_data;
- $subfield_data{tag}=$tag;
- $subfield_data{subfield}=$subfield;
- $subfield_data{marc_lib}="<DIV
id=\"error$i\">".$tagslib->{$tag}->{$subfield}->{lib}."</div>";
-
$subfield_data{tag_mandatory}=$tagslib->{$tag}->{mandatory};
-
$subfield_data{mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory};
-
$subfield_data{repeatable}=$tagslib->{$tag}->{$subfield}->{repeatable};
# if breeding is not empty
if ($record ne -1) {
! my ($x,$value) =
find_value($tag,$subfield,$record);
! $value=char_decode($value) unless ($is_a_modif);
! $indicator = $x if $x; #XXX
! if
($tagslib->{$tag}->{$subfield}->{authorised_value}) {
! $subfield_data{marc_value}=
build_authorized_values_list($tag, $subfield, $value, $dbh,
$authorised_values_sth);
! } elsif
($tagslib->{$tag}->{$subfield}->{thesaurus_category}) {
! $subfield_data{marc_value}="<input
type=\"text\" name=\"field_value\" size=47 maxlength=255> <a
href=\"javascript:Dopop('../thesaurus_popup.pl?category=$tagslib->{$tag}->{$subfield}->{thesaurus_category}&index=$i',$i)\">...</a>";
#"
! } elsif
($tagslib->{$tag}->{$subfield}->{'value_builder'}) {
! my
$plugin="../value_builder/".$tagslib->{$tag}->{$subfield}->{'value_builder'};
! require $plugin;
! my $extended_param =
plugin_parameters($dbh,$record,$tagslib,$i,$tabloop);
! my ($function_name,$javascript) =
plugin_javascript($dbh,$record,$tagslib,$i,$tabloop);
! $subfield_data{marc_value}="<input
type=\"text\" name=\"field_value\" value=\"$value\" size=47 maxlength=255
OnFocus=\"javascript:Focus$function_name($i)\"
OnBlur=\"javascript:Blur$function_name($i)\"> <a
href=\"javascript:Clic$function_name($i)\">...</a> $javascript";
! } else {
! $subfield_data{marc_value}="<input
type=\"text\" name=\"field_value\" value=\"$value\" size=50 maxlength=255>";
}
# if breeding is empty
--- 179,210 ----
next if subfield_is_koha_internal_p($subfield);
next if ($tagslib->{$tag}->{$subfield}->{tab} ne
$tabloop);
# if breeding is not empty
if ($record ne -1) {
! my ($x,@value) =
find_value($tag,$subfield,$record);
! foreach my $value (@value) {
! my %subfield_data;
! $subfield_data{tag}=$tag;
! $subfield_data{subfield}=$subfield;
! $subfield_data{marc_lib}="<DIV
id=\"error$i\">".$tagslib->{$tag}->{$subfield}->{lib}."</div>";
!
$subfield_data{tag_mandatory}=$tagslib->{$tag}->{mandatory};
!
$subfield_data{mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory};
!
$subfield_data{repeatable}=$tagslib->{$tag}->{$subfield}->{repeatable};
! $value=char_decode($value) unless
($is_a_modif);
! $indicator = $x if $x; #XXX
! if
($tagslib->{$tag}->{$subfield}->{authorised_value}) {
! $subfield_data{marc_value}=
build_authorized_values_list($tag, $subfield, $value, $dbh,
$authorised_values_sth);
! } elsif
($tagslib->{$tag}->{$subfield}->{thesaurus_category}) {
!
$subfield_data{marc_value}="<input type=\"text\" name=\"field_value\" size=47
maxlength=255> <a
href=\"javascript:Dopop('../thesaurus_popup.pl?category=$tagslib->{$tag}->{$subfield}->{thesaurus_category}&index=$i',$i)\">...</a>";
#"
! } elsif
($tagslib->{$tag}->{$subfield}->{'value_builder'}) {
! my
$plugin="../value_builder/".$tagslib->{$tag}->{$subfield}->{'value_builder'};
! require $plugin;
! my $extended_param =
plugin_parameters($dbh,$record,$tagslib,$i,$tabloop);
! my ($function_name,$javascript)
= plugin_javascript($dbh,$record,$tagslib,$i,$tabloop);
!
$subfield_data{marc_value}="<input type=\"text\" name=\"field_value\"
value=\"$value\" size=47 maxlength=255
OnFocus=\"javascript:Focus$function_name($i)\"
OnBlur=\"javascript:Blur$function_name($i)\"> <a
href=\"javascript:Clic$function_name($i)\">...</a> $javascript";
! } else {
!
$subfield_data{marc_value}="<input type=\"text\" name=\"field_value\"
value=\"$value\" size=50 maxlength=255>";
! }
! push(@subfields_data, \%subfield_data);
! $i++;
}
# if breeding is empty
***************
*** 211,214 ****
--- 213,223 ----
($x,$value) =
find_value($tag,$subfield,$record) if ($record ne -1);
$value=char_decode($value) unless ($is_a_modif);
+ my %subfield_data;
+ $subfield_data{tag}=$tag;
+ $subfield_data{subfield}=$subfield;
+ $subfield_data{marc_lib}="<DIV
id=\"error$i\">".$tagslib->{$tag}->{$subfield}->{lib}."</div>";
+
$subfield_data{tag_mandatory}=$tagslib->{$tag}->{mandatory};
+
$subfield_data{mandatory}=$tagslib->{$tag}->{$subfield}->{mandatory};
+
$subfield_data{repeatable}=$tagslib->{$tag}->{$subfield}->{repeatable};
if
($tagslib->{$tag}->{$subfield}->{authorised_value}) {
$subfield_data{marc_value}=
build_authorized_values_list($tag, $subfield, $value, $dbh,
$authorised_values_sth);
***************
*** 224,230 ****
$subfield_data{marc_value}="<input type=\"text\" name=\"field_value\" size=50
maxlength=255>";
}
}
- push(@subfields_data, \%subfield_data);
- $i++;
}
if ($#subfields_data >= 0) {
--- 233,239 ----
$subfield_data{marc_value}="<input type=\"text\" name=\"field_value\" size=50
maxlength=255>";
}
+ push(@subfields_data, \%subfield_data);
+ $i++;
}
}
if ($#subfields_data >= 0) {
Index: additem.pl
===================================================================
RCS file: /cvsroot/koha/koha/acqui.simple/additem.pl,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -r1.15 -r1.16
*** additem.pl 7 Mar 2003 16:34:05 -0000 1.15
--- additem.pl 1 Apr 2003 12:27:46 -0000 1.16
***************
*** 75,79 ****
}
my $record =
MARChtml2marc($dbh,address@hidden,address@hidden,address@hidden,%indicators);
- warn "item before NEWnewitem : ".$record->as_formatted();
# MARC::Record builded => now, record in DB
my ($oldbiblionumber,$oldbibnum,$oldbibitemnum) =
NEWnewitem($dbh,$record,$bibid);
--- 75,78 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/acqui.simple addbiblio.pl,1.21,1.22 additem.pl,1.15,1.16,
Paul POULAIN <=