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/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 (+8 lines)
Lines 6083-6088 if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { Link Here
6083
    SetVersion($DBversion);
6083
    SetVersion($DBversion);
6084
}
6084
}
6085
6085
6086
$DBversion = "XXX";
6087
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
6088
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('UNIMARCAuthorityField100', 'afrey50      ba0', NULL, NULL, 'Textarea')");
6089
    print "Upgrade to $DBversion done (Bug 9144 - Add syspref UNIMARCAuthorityField100)\n";
6090
    SetVersion ($DBversion);
6091
}
6092
6093
6086
=head1 FUNCTIONS
6094
=head1 FUNCTIONS
6087
6095
6088
=head2 TableExists($table)
6096
=head2 TableExists($table)
(-)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