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

(-)a/C4/AuthoritiesMarc.pm (-3 / +4 lines)
Lines 706-722 sub AddAuthority { Link Here
706
706
707
  if ($format eq "UNIMARCAUTH") {
707
  if ($format eq "UNIMARCAUTH") {
708
        $record->leader("     nx  j22             ") unless ($record->leader());
708
        $record->leader("     nx  j22             ") unless ($record->leader());
709
        my $date=POSIX::strftime("%Y%m%d",localtime);    
709
        my $date=POSIX::strftime("%Y%m%d",localtime);
710
	my $defaultfield100 = C4::Context->preference('UNIMARCAuthorityField100');
710
    if (my $string=$record->subfield('100',"a")){
711
    if (my $string=$record->subfield('100',"a")){
711
      	$string=~s/fre50/frey50/;
712
      	$string=~s/fre50/frey50/;
712
      	$record->field('100')->update('a'=>$string);
713
      	$record->field('100')->update('a'=>$string);
713
    }
714
    }
714
    elsif ($record->field('100')){
715
    elsif ($record->field('100')){
715
          $record->field('100')->update('a'=>$date."afrey50      ba0");
716
          $record->field('100')->update('a'=>$date.$defaultfield100);
716
    } else {      
717
    } else {      
717
        $record->append_fields(
718
        $record->append_fields(
718
        MARC::Field->new('100',' ',' '
719
        MARC::Field->new('100',' ',' '
719
            ,'a'=>$date."afrey50      ba0")
720
            ,'a'=>$date.$defaultfield100)
720
        );
721
        );
721
    }      
722
    }      
722
  }
723
  }
(-)a/authorities/authorities.pl (-11 lines)
Lines 583-599 if ($op eq "add") { Link Here
583
    my @ind_tag = $input->param('ind_tag');
583
    my @ind_tag = $input->param('ind_tag');
584
    my @indicator = $input->param('indicator');
584
    my @indicator = $input->param('indicator');
585
    my $record = TransformHtmlToMarc($input);
585
    my $record = TransformHtmlToMarc($input);
586
    if  (C4::Context->preference("marcflavour") eq "UNIMARC"){
587
        unless ($record->field('100')){
588
        use POSIX qw(strftime);
589
        my $string = strftime( "%Y%m%d", localtime(time) );
590
        # set 50 to position 26 is biblios, 13 if authorities
591
        my $pos=13;
592
        $string = sprintf( "%-*s", 35, $string );
593
        substr( $string, $pos , 2, "50" );
594
        $record->append_fields(MARC::Field->new('100','','',"a"=>$string));
595
        }    
596
    }
597
586
598
    my ($duplicateauthid,$duplicateauthvalue);
587
    my ($duplicateauthid,$duplicateauthvalue);
599
     ($duplicateauthid,$duplicateauthvalue) = FindDuplicateAuthority($record,$authtypecode) if ($op eq "add") && (!$is_a_modif);
588
     ($duplicateauthid,$duplicateauthvalue) = FindDuplicateAuthority($record,$authtypecode) if ($op eq "add") && (!$is_a_modif);
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 321-326 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( Link Here
321
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('UseTransportCostMatrix',0,"Use Transport Cost Matrix when filling holds",'','YesNo');
321
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('UseTransportCostMatrix',0,"Use Transport Cost Matrix when filling holds",'','YesNo');
322
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice');
322
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('BasketConfirmations', '1', 'When closing or reopening a basket,', 'always ask for confirmation.|do not ask for confirmation.', 'Choice');
323
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('MARCAuthorityControlField008', '|| aca||aabn           | a|a     d', NULL, NULL, 'Textarea');
323
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('MARCAuthorityControlField008', '|| aca||aabn           | a|a     d', NULL, NULL, 'Textarea');
324
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('UNIMARCAuthorityField100', 'afrey50      ba0', NULL, NULL, 'Textarea');
324
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpenLibraryCovers',0,'If ON Openlibrary book covers will be show',NULL,'YesNo');
325
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpenLibraryCovers',0,'If ON Openlibrary book covers will be show',NULL,'YesNo');
325
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowerUnwantedField','','Name the fields you don\'t need to store for a patron\'s account',NULL,'free');
326
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('BorrowerUnwantedField','','Name the fields you don\'t need to store for a patron\'s account',NULL,'free');
326
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL);
327
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('OpacKohaUrl','1',"Show 'Powered by Koha' text on OPAC footer.",NULL,NULL);
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 6399-6404 if ( CheckVersion($DBversion) ) { Link Here
6399
    SetVersion($DBversion);
6399
    SetVersion($DBversion);
6400
}
6400
}
6401
6401
6402
$DBversion = "XXX";
6403
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
6404
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('UNIMARCAuthorityField100', 'afrey50      ba0', NULL, NULL, 'Textarea')");
6405
    print "Upgrade to $DBversion done (Bug 9144 - Add syspref UNIMARCAuthorityField100)\n";
6406
    SetVersion ($DBversion);
6407
}
6408
6402
6409
6403
=head1 FUNCTIONS
6410
=head1 FUNCTIONS
6404
6411
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/authorities.pref (-1 / +6 lines)
Lines 43-48 Authorities: Link Here
43
                  yes: Use
43
                  yes: Use
44
                  no: "Don't use"
44
                  no: "Don't use"
45
            - authority record numbers instead of text strings for searches from subject tracings.
45
            - authority record numbers instead of text strings for searches from subject tracings.
46
        -
47
            - Use the following text for the contents of UNIMARC authority field 100 position (fixed length data elements). Do NOT include the date (position 00-05).
48
            - pref: UNIMARCAuthorityField100
49
              defautl: "afrey50      ba0"
50
              type: textarea
51
              class: code
46
    Linker:
52
    Linker:
47
        -
53
        -
48
            - Use the
54
            - Use the
49
- 

Return to bug 9145