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

(-)a/C4/Biblio.pm (+43 lines)
Lines 3461-3466 sub ModBiblioMarc { Link Here
3461
        # the previous version of the record
3461
        # the previous version of the record
3462
        $oldRecord = GetMarcBiblio($biblionumber);
3462
        $oldRecord = GetMarcBiblio($biblionumber);
3463
    }
3463
    }
3464
    # 
3465
    if (C4::Context->preference("IsbnIssnRemoveHyphens")){
3466
           my $isbn;
3467
           my $issn;
3468
               if ( $encoding eq 'UNIMARC' ) {
3469
                       if ( my $f010 = $record->field('010') ) {
3470
                               if ( $f010->subfield('a') ) {
3471
                                       $isbn = $f010->subfield('a');
3472
                                       $isbn =~ s/-//g;
3473
                                       $f010->update( 'a' => $isbn );
3474
                               }
3475
                       }
3476
                       if ( my $f011 = $record->field('011') ) {
3477
                               if ( $f011->subfield('a') ) {
3478
                                       $issn = $f011->subfield('a');
3479
                                       $issn =~ s/-//g;
3480
                                       $f011->update( 'a' => $issn );
3481
                               }
3482
                       }
3483
               } elsif ($encoding eq 'MARC21') {
3484
                       if ( my $f020 = $record->field('020') ) {
3485
                               $isbn = $f020->subfield('a');
3486
                               $isbn =~ s/-//g;
3487
                               $f020->update( 'a' => $isbn );
3488
                       }
3489
                       if ( my $f022 = $record->field('022') ) {
3490
                               $issn = $f022->subfield('a');
3491
                               $issn =~ s/-//g;
3492
                               $f022->update( 'a' => $issn );
3493
                       }
3494
               } elsif ($encoding eq 'NORMARC') {
3495
                       if ( my $f020 = $record->field('020') ) {
3496
                               $isbn = $f020->subfield('a');
3497
                               $isbn =~ s/-//g;
3498
                               $f020->update( 'a' => $isbn );
3499
                       }
3500
                       if ( my $f022 = $record->field('022') ) {
3501
                               $issn = $f022->subfield('a');
3502
                               $issn =~ s/-//g;
3503
                               $f022->update( 'a' => $issn );
3504
                       }
3505
               }
3506
    }
3464
    $sth = $dbh->prepare("UPDATE biblioitems SET marc=?,marcxml=? WHERE biblionumber=?");
3507
    $sth = $dbh->prepare("UPDATE biblioitems SET marc=?,marcxml=? WHERE biblionumber=?");
3465
    $sth->execute( $record->as_usmarc(), $record->as_xml_record($encoding), $biblionumber );
3508
    $sth->execute( $record->as_usmarc(), $record->as_xml_record($encoding), $biblionumber );
3466
    $sth->finish;
3509
    $sth->finish;
(-)a/C4/Search.pm (-1 / +1 lines)
Lines 1164-1170 sub buildQuery { Link Here
1164
                        $weight_fields, $fuzzy_enabled,
1164
                        $weight_fields, $fuzzy_enabled,
1165
                        $remove_stopwords
1165
                        $remove_stopwords
1166
                    ) = ( 0, 0, 0, 0, 0 );
1166
                    ) = ( 0, 0, 0, 0, 0 );
1167
1167
                    $operand =~ s/-//g if (C4::Context->preference("IsbnIssnRemoveHyphens"));
1168
                }
1168
                }
1169
1169
1170
                if(not $index){
1170
                if(not $index){
(-)a/admin/systempreferences.pl (+1 lines)
Lines 153-158 $tabsysprefs{'item-level_itypes'} = "Cataloging"; Link Here
153
$tabsysprefs{OpacSuppression}             = "Cataloging";
153
$tabsysprefs{OpacSuppression}             = "Cataloging";
154
$tabsysprefs{SpineLabelFormat}            = "Cataloging";
154
$tabsysprefs{SpineLabelFormat}            = "Cataloging";
155
$tabsysprefs{SpineLabelAutoPrint}         = "Cataloging";
155
$tabsysprefs{SpineLabelAutoPrint}         = "Cataloging";
156
$tabsysprefs{IsbnIssnRemoveHyphens}       = "Cataloging";
156
157
157
# Circulation
158
# Circulation
158
$tabsysprefs{maxoutstanding}                 = "Circulation";
159
$tabsysprefs{maxoutstanding}                 = "Circulation";
(-)a/installer/data/mysql/de-DE/mandatory/sysprefs.sql (+1 lines)
Lines 314-316 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
314
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems' ,'','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O    pacHiddenItems.txt for more informations.','','Textarea');
314
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems' ,'','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O    pacHiddenItems.txt for more informations.','','Textarea');
315
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
315
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
316
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
316
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
317
INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo');
(-)a/installer/data/mysql/en/mandatory/sysprefs.sql (+1 lines)
Lines 314-316 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
314
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
314
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
315
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
315
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
316
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
316
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
317
INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo');
(-)a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql (+1 lines)
Lines 315-317 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
315
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
315
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
316
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
316
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
317
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
317
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
318
INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo');
(-)a/installer/data/mysql/it-IT/necessari/sysprefs.sql (+1 lines)
Lines 301-303 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
301
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O    pacHiddenItems.txt for more informations.','','Textarea');
301
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O    pacHiddenItems.txt for more informations.','','Textarea');
302
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
302
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
303
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
303
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
304
INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo');
(-)a/installer/data/mysql/nb-NO/1-Obligatorisk/sysprefs.sql (+1 lines)
Lines 321-323 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ( Link Here
321
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','','free');
321
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('OpacFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the OPAC','','free');
322
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the Staff client','','free');
322
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('IntranetFavicon','','Enter a complete URL to an image to replace the default Koha favicon on the Staff client','','free');
323
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo');
323
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('TraceSubjectSubdivisions', '0', 'Create searches on all subdivisions for subject tracings.','1','YesNo');
324
INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo');
(-)a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql (+1 lines)
Lines 313-315 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
313
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
313
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
314
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
314
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
315
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
315
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
316
INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo');
(-)a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql (+1 lines)
Lines 368-370 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
368
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
368
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/OpacHiddenItems.txt for more informations.','','Textarea');
369
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
369
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
370
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
370
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
371
INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo');
(-)a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql (+1 lines)
Lines 393-395 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
393
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O    pacHiddenItems.txt for more informations.','','Textarea');
393
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHiddenItems','','This syspref allows to define custom rules for hiding specific items at opac. See docs/opac/O    pacHiddenItems.txt for more informations.','','Textarea');
394
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
394
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('numSearchRSSResults',50,'Specify the maximum number of results to display on a RSS page of results',NULL,'Integer');
395
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
395
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OpacRenewalBranch','checkoutbranch','Choose how the branch for an OPAC renewal is recorded in statistics','itemhomebranch|patronhomebranch|checkoutbranch|null','Choice');
396
INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo');
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 4370-4375 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
4370
    SetVersion($DBversion);
4370
    SetVersion($DBversion);
4371
}
4371
}
4372
4372
4373
$DBversion = "3.05.00.XXX";
4374
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4375
    $dbh->do("INSERT INTO `systempreferences` (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('IsbnIssnRemoveHyphens', '0', '', 'Remove or not hyphens from ISBN and ISSN', 'YesNo');");
4376
    print "Upgrade to $DBversion done (Add SysPref to remove hyphens or not into isbn and issn)\n";
4377
    SetVersion($DBversion);
4378
}
4379
4373
=head1 FUNCTIONS
4380
=head1 FUNCTIONS
4374
4381
4375
=head2 DropAllForeignKeys($table)
4382
=head2 DropAllForeignKeys($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref (-1 / +6 lines)
Lines 84-89 Cataloging: Link Here
84
                  annual: generated in the form &lt;year&gt;-0001, &lt;year&gt;-0002.
84
                  annual: generated in the form &lt;year&gt;-0001, &lt;year&gt;-0002.
85
                  hbyymmincr: generated in the form &lt;branchcode&gt;yymm0001.
85
                  hbyymmincr: generated in the form &lt;branchcode&gt;yymm0001.
86
                  "OFF": not generated automatically.
86
                  "OFF": not generated automatically.
87
        -
88
            - pref: IsbnIssnRemoveHyphens
89
              choices:
90
                  yes: "Remove"
91
                  no: "Don't remove"
92
            - hyphens from ISBN and ISSN
87
    Display:
93
    Display:
88
        -
94
        -
89
            - 'Separate multiple displayed authors, series or subjects with '
95
            - 'Separate multiple displayed authors, series or subjects with '
90
- 

Return to bug 6590