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

(-)a/cataloguing/additem.pl (-4 / +4 lines)
Lines 369-376 my ($template, $loggedinuser, $cookie) Link Here
369
369
370
370
371
# Does the user have a limited item edition permission?
371
# Does the user have a limited item edition permission?
372
my $uid = GetMember( borrowernumber => $loggedinuser )->{userid} if ($loggedinuser) ;
372
my $uid = $loggedinuser ? GetMember( borrowernumber => $loggedinuser )->{userid} : undef;
373
my $limitededition = haspermission($uid,  {'editcatalogue' => 'limited_item_edition'}) if ($uid);
373
my $limitededition = $uid ? haspermission($uid,  {'editcatalogue' => 'limited_item_edition'}) : undef;
374
# In case user is a superlibrarian, edition is not limited
374
# In case user is a superlibrarian, edition is not limited
375
$limitededition = 0 if ($limitededition != 0 && $limitededition->{'superlibrarian'} eq 1);
375
$limitededition = 0 if ($limitededition != 0 && $limitededition->{'superlibrarian'} eq 1);
376
376
Lines 830-839 foreach my $tag ( keys %{$tagslib}){ Link Here
830
        my @values = (undef);
830
        my @values = (undef);
831
        @values = $itemrecord->field($tag)->subfield($subtag) if ($itemrecord && defined($itemrecord->field($tag)) && defined($itemrecord->field($tag)->subfield($subtag)));
831
        @values = $itemrecord->field($tag)->subfield($subtag) if ($itemrecord && defined($itemrecord->field($tag)) && defined($itemrecord->field($tag)->subfield($subtag)));
832
        for my $value (@values){
832
        for my $value (@values){
833
            my $subfield_data = generate_subfield_form($tag, $subtag, $value, $tagslib, $tagslib->{$tag}->{$subtag}, $branches, $today_iso, $biblionumber, $temp, \@loop_data, $i, $limitededition); 
833
            my $subfield_data = generate_subfield_form($tag, $subtag, $value, $tagslib, $tagslib->{$tag}->{$subtag}, $branches, $today_iso, $biblionumber, $temp, \@loop_data, $i, $limitededition);
834
            push (@loop_data, $subfield_data);
834
            push (@loop_data, $subfield_data);
835
            $i++;
835
            $i++;
836
        } 
836
        }
837
  }
837
  }
838
}
838
}
839
@loop_data = sort {$a->{subfield} cmp $b->{subfield} } @loop_data;
839
@loop_data = sort {$a->{subfield} cmp $b->{subfield} } @loop_data;
(-)a/tools/batchMod.pl (-3 / +2 lines)
Lines 71-78 my ($template, $loggedinuser, $cookie) Link Here
71
                 });
71
                 });
72
72
73
# Does the user have a limited item edition permission?
73
# Does the user have a limited item edition permission?
74
my $uid = GetMember( borrowernumber => $loggedinuser )->{userid} if ($loggedinuser) ;
74
my $uid = $loggedinuser ? GetMember( borrowernumber => $loggedinuser )->{userid} : undef;
75
my $limitededition = haspermission($uid,  {'tools' => 'items_limited_batchmod'}) if ($uid);
75
my $limitededition = $uid ? haspermission($uid,  {'tools' => 'items_limited_batchmod'}) : undef;
76
# In case user is a superlibrarian, edition is not limited
76
# In case user is a superlibrarian, edition is not limited
77
$limitededition = 0 if ($limitededition != 0 && $limitededition->{'superlibrarian'} eq 1);
77
$limitededition = 0 if ($limitededition != 0 && $limitededition->{'superlibrarian'} eq 1);
78
78
79
- 

Return to bug 7673