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

(-)a/tools/batchMod.pl (-4 / +3 lines)
Lines 226-233 my $authorised_values_sth = $dbh->prepare("SELECT authorised_value,lib FROM auth Link Here
226
my $branches = GetBranchesLoop();  # build once ahead of time, instead of multiple times later.
226
my $branches = GetBranchesLoop();  # build once ahead of time, instead of multiple times later.
227
227
228
# Adding a default choice, in case the user does not want to modify the branch
228
# Adding a default choice, in case the user does not want to modify the branch
229
my @nochange_branch = { branchname => '', value => '', selected => 1 };
229
my $nochange_branch = { branchname => '', value => '', selected => 1 };
230
unshift (@$branches, @nochange_branch);
230
unshift (@$branches, $nochange_branch);
231
231
232
my $pref_itemcallnumber = C4::Context->preference('itemcallnumber');
232
my $pref_itemcallnumber = C4::Context->preference('itemcallnumber');
233
233
Lines 280-287 foreach my $tag (sort keys %{$tagslib}) { Link Here
280
	    foreach my $thisbranch (@$branches) {
280
	    foreach my $thisbranch (@$branches) {
281
		push @authorised_values, $thisbranch->{value};
281
		push @authorised_values, $thisbranch->{value};
282
		$authorised_lib{$thisbranch->{value}} = $thisbranch->{branchname};
282
		$authorised_lib{$thisbranch->{value}} = $thisbranch->{branchname};
283
		$value = $thisbranch->{value} if $thisbranch->{selected};
284
	    }
283
	    }
284
        $value = "";
285
	}
285
	}
286
	elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) {
286
	elsif ( $tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes" ) {
287
	    push @authorised_values, "" unless ( $tagslib->{$tag}->{$subfield}->{mandatory} );
287
	    push @authorised_values, "" unless ( $tagslib->{$tag}->{$subfield}->{mandatory} );
288
- 

Return to bug 3916