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

(-)a/C4/Biblio.pm (-1 / +4 lines)
Lines 3624-3629 sub ModBiblioMarc { Link Here
3624
3624
3625
    # deal with UNIMARC field 100 (encoding) : create it if needed & set encoding to unicode
3625
    # deal with UNIMARC field 100 (encoding) : create it if needed & set encoding to unicode
3626
    if ( $encoding eq "UNIMARC" ) {
3626
    if ( $encoding eq "UNIMARC" ) {
3627
	my $defaultlanguage = C4::Context->preference("UNIMARCField100Language");
3628
        $defaultlanguage = "fre" if (!$defaultlanguage || length($defaultlanguage) != 3);
3627
        my $string = $record->subfield( 100, "a" );
3629
        my $string = $record->subfield( 100, "a" );
3628
        if ( ($string) && ( length( $record->subfield( 100, "a" ) ) == 36 ) ) {
3630
        if ( ($string) && ( length( $record->subfield( 100, "a" ) ) == 36 ) ) {
3629
            my $f100 = $record->field(100);
3631
            my $f100 = $record->field(100);
Lines 3632-3639 sub ModBiblioMarc { Link Here
3632
            $string = POSIX::strftime( "%Y%m%d", localtime );
3634
            $string = POSIX::strftime( "%Y%m%d", localtime );
3633
            $string =~ s/\-//g;
3635
            $string =~ s/\-//g;
3634
            $string = sprintf( "%-*s", 35, $string );
3636
            $string = sprintf( "%-*s", 35, $string );
3637
	    substr ( $string, 22, 3, $defaultlanguage);
3635
        }
3638
        }
3636
        substr( $string, 22, 6, "frey50" );
3639
        substr( $string, 25, 3, "y50" );
3637
        unless ( $record->subfield( 100, "a" ) ) {
3640
        unless ( $record->subfield( 100, "a" ) ) {
3638
            $record->insert_fields_ordered( MARC::Field->new( 100, "", "", "a" => $string ) );
3641
            $record->insert_fields_ordered( MARC::Field->new( 100, "", "", "a" => $string ) );
3639
        }
3642
        }
(-)a/cataloguing/value_builder/unimarc_field_100.pl (-1 / +4 lines)
Lines 82-87 sub plugin { Link Here
82
82
83
    my $dbh = C4::Context->dbh;
83
    my $dbh = C4::Context->dbh;
84
84
85
    my $defaultlanguage = C4::Context->preference("UNIMARCField100Language");
86
    $defaultlanguage = "fre" if (!$defaultlanguage || length($defaultlanguage) != 3);
87
85
    my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
88
    my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
86
        {
89
        {
87
            template_name => "cataloguing/value_builder/unimarc_field_100.tmpl",
90
            template_name => "cataloguing/value_builder/unimarc_field_100.tmpl",
Lines 92-98 sub plugin { Link Here
92
            debug           => 1,
95
            debug           => 1,
93
        }
96
        }
94
    );
97
    );
95
    $result = '        d        u  y0frey50      ba' unless $result;
98
    $result = "        d        u  y0".$defaultlanguage."y50      ba" unless $result;
96
    my $f1 = substr( $result, 0, 8 );
99
    my $f1 = substr( $result, 0, 8 );
97
    if ( $f1 eq '        ' ) {
100
    if ( $f1 eq '        ' ) {
98
        my @today = Date::Calc::Today();
101
        my @today = Date::Calc::Today();
(-)a/installer/data/mysql/sysprefs.sql (+2 lines)
Lines 389-394 INSERT INTO systempreferences (variable,value,explanation,type) VALUES('INTRAdid Link Here
389
INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('BlockReturnOfWithdrawnItems', '1', '0', 'If enabled, items that are marked as withdrawn cannot be returned.', 'YesNo');
389
INSERT INTO systempreferences (variable, value, options, explanation, type) VALUES ('BlockReturnOfWithdrawnItems', '1', '0', 'If enabled, items that are marked as withdrawn cannot be returned.', 'YesNo');
390
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HoldsToPullStartDate','2','Set the default start date for the Holds to pull list to this many days ago',NULL,'Integer');
390
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('HoldsToPullStartDate','2','Set the default start date for the Holds to pull list to this many days ago',NULL,'Integer');
391
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('alphabet','A B C D E F G H I J K L M N O P Q R S T U V W X Y Z','Alphabet than can be expanded into browse links, e.g. on Home > Patrons',NULL,'free');
391
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('alphabet','A B C D E F G H I J K L M N O P Q R S T U V W X Y Z','Alphabet than can be expanded into browse links, e.g. on Home > Patrons',NULL,'free');
392
<<<<<<< HEAD
392
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RefundLostItemFeeOnReturn', '1', 'If enabled, the lost item fee charged to a borrower will be refunded when the lost item is returned.', NULL, 'YesNo');
393
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('RefundLostItemFeeOnReturn', '1', 'If enabled, the lost item fee charged to a borrower will be refunded when the lost item is returned.', NULL, 'YesNo');
393
INSERT INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES
394
INSERT INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES
394
('PatronSelfRegistration', '0', NULL, 'If enabled, patrons will be able to register themselves via the OPAC.', 'YesNo'),
395
('PatronSelfRegistration', '0', NULL, 'If enabled, patrons will be able to register themselves via the OPAC.', 'YesNo'),
Lines 411-413 INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ( Link Here
411
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReviews','0','Display book review snippets from IDreamBooks.com','','YesNo');
412
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReviews','0','Display book review snippets from IDreamBooks.com','','YesNo');
412
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReadometer','0','Display Readometer from IDreamBooks.com','','YesNo');
413
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksReadometer','0','Display Readometer from IDreamBooks.com','','YesNo');
413
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksResults','0','Display IDreamBooks.com rating in search results','','YesNo');
414
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('IDreamBooksResults','0','Display IDreamBooks.com rating in search results','','YesNo');
415
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UNIMARCField100Language', 'fre','UNIMARC field 100 default language',NULL,'short');
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +7 lines)
Lines 1-3 Link Here
1
1
#!/usr/bin/perl
2
#!/usr/bin/perl
2
3
3
# Database Updater
4
# Database Updater
Lines 6399-6404 if ( CheckVersion($DBversion) ) { Link Here
6399
    SetVersion($DBversion);
6400
    SetVersion($DBversion);
6400
}
6401
}
6401
6402
6403
$DBversion = "3.11.00.XXX";
6404
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
6405
    $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UNIMARCField100Language', 'fre','UNIMARC field 100 default language',NULL,'short')");
6406
    print "Upgrade to $DBversion done (Bug 8347 - Koha forces UNIMARC 100 field code language to 'fre')\n";
6407
    SetVersion($DBversion);
6408
}
6402
6409
6403
=head1 FUNCTIONS
6410
=head1 FUNCTIONS
6404
6411
6405
- 

Return to bug 8347