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

(-)a/cataloguing/addbiblio.pl (-2 / +2 lines)
Lines 662-669 sub build_tabs { Link Here
662
                        tag_lib          => $tagslib->{$tag}->{lib},
662
                        tag_lib          => $tagslib->{$tag}->{lib},
663
                        repeatable       => $tagslib->{$tag}->{repeatable},
663
                        repeatable       => $tagslib->{$tag}->{repeatable},
664
                        mandatory       => $tagslib->{$tag}->{mandatory},
664
                        mandatory       => $tagslib->{$tag}->{mandatory},
665
                        indicator1       => $indicator1,
665
                        indicator1       => ( $indicator1 || $tagslib->{$tag}->{ind1_defaultvalue} ), #if not set, try to load the default value
666
                        indicator2       => $indicator2,
666
                        indicator2       => ( $indicator2 || $tagslib->{$tag}->{ind2_defaultvalue} ), #use short-circuit operator for efficiency
667
                        subfield_loop    => \@subfields_data,
667
                        subfield_loop    => \@subfields_data,
668
                        tagfirstsubfield => $subfields_data[0],
668
                        tagfirstsubfield => $subfields_data[0],
669
                        fixedfield       => $tag < 10?1:0,
669
                        fixedfield       => $tag < 10?1:0,
(-)a/installer/data/mysql/atomicupdate/bug_9701-add_default_indicators.sql (+3 lines)
Line 0 Link Here
1
ALTER TABLE marc_tag_structure
2
ADD COLUMN ind2_defaultvalue VARCHAR(1) NOT NULL DEFAULT '' AFTER authorized_value,
3
ADD COLUMN ind1_defaultvalue VARCHAR(1) NOT NULL DEFAULT '' AFTER authorized_value;
(-)a/installer/data/mysql/updatedatabase.pl (-13 lines)
Lines 12614-12631 if ( CheckVersion($DBversion) ) { Link Here
12614
                SetVersion($DBversion);
12614
                SetVersion($DBversion);
12615
}
12615
}
12616
12616
12617
$DBversion = "16.06.00.002";
12618
if (CheckVersion($DBversion) ) {
12619
	$dbh->do(q{
12620
		ALTER TABLE marc_tag_structure ADD COLUMN ind2_defaultvalue VARCHAR(1) NOT NULL DEFAULT '' AFTER authorized_value;
12621
    });
12622
	$dbh->do(q{
12623
		ALTER TABLE marc_tag_structure ADD COLUMN ind1_defaultvalue VARCHAR(1) NOT NULL DEFAULT '' AFTER authorized_value;
12624
    });
12625
	    print "Upgrade to $DBversion done (Bug 9701 - Configure default indicator)"
12626
		SetVersion($DBversion)
12627
}
12628
12629
12617
12630
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
12618
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
12631
# SEE bug 13068
12619
# SEE bug 13068
12632
- 

Return to bug 9701