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

(-)a/C4/Biblio.pm (+11 lines)
Lines 2892-2897 sub ModBiblioMarc { Link Here
2892
      $f005->update(sprintf("%4d%02d%02d%02d%02d%04.1f",@a)) if $f005;
2892
      $f005->update(sprintf("%4d%02d%02d%02d%02d%04.1f",@a)) if $f005;
2893
    }
2893
    }
2894
2894
2895
    if ( C4::Context->preference('StripWhitespaceChars') ) {
2896
        foreach my $field ( $record->fields ) {
2897
            foreach my $subfield ( $field->subfields ) {
2898
                my $key = $subfield->[0];
2899
                my $value = $subfield->[1];
2900
                $value =~ s/^\s+|\s+$|\n+$|\r+$|\t+$//g;
2901
                $field->update( $key => $value );
2902
            }
2903
        }
2904
    }
2905
2895
    my $metadata = {
2906
    my $metadata = {
2896
        biblionumber => $biblionumber,
2907
        biblionumber => $biblionumber,
2897
        format       => 'marcxml',
2908
        format       => 'marcxml',
(-)a/installer/data/mysql/atomicupdate/bug_30358_-_add_StripWhitespaceChars_syspref.pl (+12 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "30358",
5
    description => "Add new system preference StripWhitespaceChars",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('StripWhitespaceChars', '0', NULL, 'Strip leading and trailing whitespace characters from input fields when cataloguing bibliographic and authority records.', 'YesNo') });
11
    },
12
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 642-647 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
642
('StatisticsFields','location|itype|ccode', NULL, 'Define Fields (from the items table) used for statistics members','Free'),
642
('StatisticsFields','location|itype|ccode', NULL, 'Define Fields (from the items table) used for statistics members','Free'),
643
('StockRotation','0',NULL,'If ON, enables the stock rotation module','YesNo'),
643
('StockRotation','0',NULL,'If ON, enables the stock rotation module','YesNo'),
644
('StoreLastBorrower','0','','If ON, the last borrower to return an item will be stored in items.last_returned_by','YesNo'),
644
('StoreLastBorrower','0','','If ON, the last borrower to return an item will be stored in items.last_returned_by','YesNo'),
645
('StripWhitespaceChars','0',NULL,'Strip leading and trailing whitespace characters from input fields when cataloguing bibliographic and authority records.','YesNo'),
645
('SubfieldsToAllowForRestrictedBatchmod','','Define a list of subfields for which edition is authorized when items_batchmod_restricted permission is enabled, separated by spaces. Example: 995\$f 995\$h 995\$j',NULL,'Free'),
646
('SubfieldsToAllowForRestrictedBatchmod','','Define a list of subfields for which edition is authorized when items_batchmod_restricted permission is enabled, separated by spaces. Example: 995\$f 995\$h 995\$j',NULL,'Free'),
646
('SubfieldsToAllowForRestrictedEditing','','Define a list of subfields for which edition is authorized when edit_items_restricted permission is enabled, separated by spaces. Example: 995\$f 995\$h 995\$j',NULL,'Free'),
647
('SubfieldsToAllowForRestrictedEditing','','Define a list of subfields for which edition is authorized when edit_items_restricted permission is enabled, separated by spaces. Example: 995\$f 995\$h 995\$j',NULL,'Free'),
647
('SubfieldsToUseWhenPrefill','','','Define a list of subfields to use when prefilling items (separated by space)','Free'),
648
('SubfieldsToUseWhenPrefill','','','Define a list of subfields to use when prefilling items (separated by space)','Free'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (-1 / +6 lines)
Lines 165-170 Cataloging: Link Here
165
            - and record's last modifier name in MARC subfield
165
            - and record's last modifier name in MARC subfield
166
            - pref: MarcFieldForModifierName
166
            - pref: MarcFieldForModifierName
167
            - ". <br/><strong>NOTE:</strong> Use a dollar sign between field and subfield like 123$a."
167
            - ". <br/><strong>NOTE:</strong> Use a dollar sign between field and subfield like 123$a."
168
        -
169
            - pref: StripWhitespaceChars
170
              choices:
171
                  1: Strip
172
                  0: "Don't strip"
173
            - leading and trailing whitespace characters from input fields when cataloguing bibliographic and authority records.
168
    Display:
174
    Display:
169
        -
175
        -
170
            - 'Separate main entry and subdivisions with '
176
            - 'Separate main entry and subdivisions with '
171
- 

Return to bug 30358