View | Details | Raw Unified | Return to bug 5528
Collapse All | Expand All

(-)a/cataloguing/additem.pl (-9 / +27 lines)
Lines 544-563 my @fields = $temp->fields(); Link Here
544
544
545
545
546
my @hostitemnumbers;
546
my @hostitemnumbers;
547
foreach my $hostfield ($temp->field('773')){
547
if ($marcflavour  eq 'MARC21'){
548
        if ($hostfield->subfield('0')){
548
    foreach my $hostfield ($temp->field('773')){
549
                my $hostrecord = GetMarcBiblio($hostfield->subfield('0'), 1);
549
	    if ($hostfield->subfield('0')){
550
                foreach my $hostitem ($hostrecord->field('952')){
550
		    my $hostrecord = GetMarcBiblio($hostfield->subfield('0'), 1);
551
                        if ($hostitem->subfield('9') eq $hostfield->subfield('9')){
551
            foreach my $hostitem ($hostrecord->field('952')){
552
                                push (@fields, $hostitem);
552
                if ($hostitem->subfield('9') eq $hostfield->subfield('9')){
553
                                push (@hostitemnumbers, $hostfield->subfield('9'));
553
                    push (@fields, $hostitem);
554
                        }
554
                    push (@hostitemnumbers, $hostfield->subfield('9'));
555
                }
555
                }
556
        }
556
            }
557
	    }
558
    }
559
}
560
if ($marcflavour  eq 'UNIMARC'){
561
    foreach my $hostfield ($temp->field('461')){
562
	    if ($hostfield->subfield('0')){
563
		    my $hostrecord = GetMarcBiblio($hostfield->subfield('0'), 1);
564
            foreach my $hostitem ($hostrecord->field('995')){
565
                if ($hostitem->subfield('9') eq $hostfield->subfield('9')){
566
                    push (@fields, $hostitem);
567
                    push (@hostitemnumbers, $hostfield->subfield('9'));
568
                }
569
            }
570
	    }
571
    }
557
}
572
}
558
573
559
574
560
575
576
577
578
561
foreach my $field (@fields) {
579
foreach my $field (@fields) {
562
    next if ( $field->tag() < 10 );
580
    next if ( $field->tag() < 10 );
563
581
(-)a/installer/data/mysql/updatedatabase.pl (-5 / +12 lines)
Lines 4454-4463 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
4454
4454
4455
$DBversion = '3.05.00.012';
4455
$DBversion = '3.05.00.012';
4456
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4456
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4457
    $dbh->do("INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value` , `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES ('773', '0', 'Host Biblionumber', 'Host Biblionumber', 0, 0, NULL, 7, NULL, NULL, '', NULL, -6, '', '', '', NULL)");
4457
    if (C4::Context->preference("marcflavour") eq 'MARC21'){
4458
    $dbh->do("INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value` , `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES ('773', '9', 'Host Itemnumber', 'Host Itemnumber', 0, 0, NULL, 7, NULL, NULL, '', NULL, -6, '', '', '', NULL)");
4458
        $dbh->do("INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value` , `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES ('773', '0', 'Host Biblionumber', 'Host Biblionumber', 0, 0, NULL, 7, NULL, NULL, '', NULL, -6, '', '', '', NULL)");
4459
    print "Upgrade to $DBversion done (Add 773 subfield 9 and 0 to default framework)\n";
4459
        $dbh->do("INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value` , `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES ('773', '9', 'Host Itemnumber', 'Host Itemnumber', 0, 0, NULL, 7, NULL, NULL, '', NULL, -6, '', '', '', NULL)");
4460
    SetVersion ($DBversion);
4460
        print "Upgrade to $DBversion done (Add 773 subfield 9 and 0 to default framework)\n";
4461
        SetVersion ($DBversion);
4462
    }
4463
    if (C4::Context->preference("marcflavour") eq 'UNIMARC'){
4464
        $dbh->do("INSERT INTO `marc_subfield_structure` (`tagfield`, `tagsubfield`, `liblibrarian`, `libopac`, `repeatable`, `mandatory`, `kohafield`, `tab`, `authorised_value` , `authtypecode`, `value_builder`, `isurl`, `hidden`, `frameworkcode`, `seealso`, `link`, `defaultvalue`) VALUES ('461', '9', 'Host Itemnumber', 'Host Itemnumber', 0, 0, NULL, 7, NULL, NULL, '', NULL, -6, '', '', '', NULL)");
4465
        print "Upgrade to $DBversion done (Add 461 subfield 9 to default framework)\n";
4466
        SetVersion ($DBversion);
4467
    }
4468
		
4461
}
4469
}
4462
4470
4463
4471
4464
- 

Return to bug 5528