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

(-)a/C4/Biblio.pm (-5 / +3 lines)
Lines 100-106 use C4::Charset qw( Link Here
100
);
100
);
101
use C4::Linker;
101
use C4::Linker;
102
use C4::OAI::Sets;
102
use C4::OAI::Sets;
103
use C4::Items qw( GetHiddenItemnumbers GetMarcItem );
103
use C4::Items qw( GetMarcItem );
104
104
105
use Koha::Logger;
105
use Koha::Logger;
106
use Koha::Caches;
106
use Koha::Caches;
Lines 2546-2560 sub EmbedItemsInMarcBiblio { Link Here
2546
        }
2546
        }
2547
        push @items, { itemnumber => $itemnumber, item => $item };
2547
        push @items, { itemnumber => $itemnumber, item => $item };
2548
    }
2548
    }
2549
    my @items2pass = map { $_->{item} } @items;
2550
    my @hiddenitems =
2551
      $opachiddenitems
2552
      ? C4::Items::GetHiddenItemnumbers({
2553
            items  => \@items2pass,
2549
            items  => \@items2pass,
2554
            borcat => $borcat })
2550
            borcat => $borcat })
2555
      : ();
2551
      : ();
2556
    # Convert to a hash for quick searching
2552
    # Convert to a hash for quick searching
2557
    my %hiddenitems = map { $_ => 1 } @hiddenitems;
2553
    my %hiddenitems = map { $_ => 1 } @hiddenitems;
2554
    my @itemnumbers = Koha::Items->search( { itemnumber => $itemnumbers } )
2555
      ->filter_by_visible_in_opac({ patron => })->get_column('itemnumber');
2558
    foreach my $itemnumber ( map { $_->{itemnumber} } @items ) {
2556
    foreach my $itemnumber ( map { $_->{itemnumber} } @items ) {
2559
        next if $hiddenitems{$itemnumber};
2557
        next if $hiddenitems{$itemnumber};
2560
        my $item_marc = C4::Items::GetMarcItem( $biblionumber, $itemnumber );
2558
        my $item_marc = C4::Items::GetMarcItem( $biblionumber, $itemnumber );
(-)a/C4/Items.pm (-60 lines)
Lines 38-44 BEGIN { Link Here
38
        GetItemsLocationInfo
38
        GetItemsLocationInfo
39
        GetHostItemsInfo
39
        GetHostItemsInfo
40
        get_hostitemnumbers_of
40
        get_hostitemnumbers_of
41
        GetHiddenItemnumbers
42
        GetMarcItem
41
        GetMarcItem
43
        CartToShelf
42
        CartToShelf
44
        GetAnalyticsCount
43
        GetAnalyticsCount
Lines 979-1043 sub get_hostitemnumbers_of { Link Here
979
    return @returnhostitemnumbers;
978
    return @returnhostitemnumbers;
980
}
979
}
981
980
982
=head2 GetHiddenItemnumbers
983
984
    my @itemnumbers_to_hide = GetHiddenItemnumbers({ items => \@items, borcat => $category });
985
986
Given a list of items it checks which should be hidden from the OPAC given
987
the current configuration. Returns a list of itemnumbers corresponding to
988
those that should be hidden. Optionally takes a borcat parameter for certain borrower types
989
to be excluded
990
991
=cut
992
993
sub GetHiddenItemnumbers {
994
    my $params = shift;
995
    my $items = $params->{items};
996
    if (my $exceptions = C4::Context->preference('OpacHiddenItemsExceptions') and $params->{'borcat'}){
997
        foreach my $except (split(/\|/, $exceptions)){
998
            if ($params->{'borcat'} eq $except){
999
                return; # we don't hide anything for this borrower category
1000
            }
1001
        }
1002
    }
1003
    my @resultitems;
1004
1005
    my $hidingrules = C4::Context->yaml_preference('OpacHiddenItems');
1006
1007
    return
1008
        unless $hidingrules;
1009
1010
    my $dbh = C4::Context->dbh;
1011
1012
    # For each item
1013
    foreach my $item (@$items) {
1014
1015
        # We check each rule
1016
        foreach my $field (keys %$hidingrules) {
1017
            my $val;
1018
            if (exists $item->{$field}) {
1019
                $val = $item->{$field};
1020
            }
1021
            else {
1022
                my $query = "SELECT $field from items where itemnumber = ?";
1023
                $val = $dbh->selectrow_array($query, undef, $item->{'itemnumber'});
1024
            }
1025
            $val = '' unless defined $val;
1026
1027
            # If the results matches the values in the yaml file
1028
            if (any { $val eq $_ } @{$hidingrules->{$field}}) {
1029
1030
                # We add the itemnumber to the list
1031
                push @resultitems, $item->{'itemnumber'};
1032
1033
                # If at least one rule matched for an item, no need to test the others
1034
                last;
1035
            }
1036
        }
1037
    }
1038
    return @resultitems;
1039
}
1040
1041
=head1 LIMITED USE FUNCTIONS
981
=head1 LIMITED USE FUNCTIONS
1042
982
1043
The following functions, while part of the public API,
983
The following functions, while part of the public API,
(-)a/C4/Search.pm (-10 / +5 lines)
Lines 1802-1822 sub searchResults { Link Here
1802
            }
1802
            }
1803
            $item->{description} = $itemtypes{ $item->{itype} }{translated_description} if $item->{itype};
1803
            $item->{description} = $itemtypes{ $item->{itype} }{translated_description} if $item->{itype};
1804
1804
1805
	        # OPAC hidden items
1805
            # OPAC hidden items
1806
            if ($is_opac) {
1806
            if ($is_opac) {
1807
                # hidden because lost
1807
                # hidden based on OpacHiddenItems syspref or because lost
1808
                if ($hidelostitems && $item->{itemlost}) {
1808
                my $hi = Koha::Items->search( { itemnumber => $item->{itemnumber} } )
1809
                                    ->filter_by_visible_in_opac({ patron => $search_context->{patron} });
1810
                unless ( $hi->count ) {
1809
                    push @hiddenitems, $item->{itemnumber};
1811
                    push @hiddenitems, $item->{itemnumber};
1810
                    $hideatopac_count++;
1812
                    $hideatopac_count++;
1811
                    next;
1813
                    next;
1812
                }
1814
                }
1813
                # hidden based on OpacHiddenItems syspref
1814
                my @hi = C4::Items::GetHiddenItemnumbers({ items=> [ $item ], borcat => $search_context->{category} });
1815
                if (scalar @hi) {
1816
                    push @hiddenitems, @hi;
1817
                    $hideatopac_count++;
1818
                    next;
1819
                }
1820
            }
1815
            }
1821
1816
1822
            my $hbranch     = C4::Context->preference('StaffSearchResultsDisplayBranch');
1817
            my $hbranch     = C4::Context->preference('StaffSearchResultsDisplayBranch');
(-)a/opac/opac-basket.pl (-26 / +9 lines)
Lines 26-32 use C4::Biblio qw( Link Here
26
    GetMarcSubjects
26
    GetMarcSubjects
27
    GetMarcUrls
27
    GetMarcUrls
28
);
28
);
29
use C4::Items qw( GetHiddenItemnumbers GetItemsInfo );
30
use C4::Circulation qw( GetTransfers );
29
use C4::Circulation qw( GetTransfers );
31
use C4::Auth qw( get_template_and_user );
30
use C4::Auth qw( get_template_and_user );
32
use C4::Output qw( output_html_with_http_headers );
31
use C4::Output qw( output_html_with_http_headers );
Lines 63-74 if (C4::Context->preference('TagsEnabled')) { Link Here
63
	}
62
	}
64
}
63
}
65
64
66
my $borcat = q{};
65
my $logged_in_user = Koha::Patrons->find($borrowernumber);
67
if ( C4::Context->preference('OpacHiddenItemsExceptions') ) {
68
    # we need to fetch the borrower info here, so we can pass the category
69
    my $patron = Koha::Patrons->find($borrowernumber);
70
    $borcat = $patron ? $patron->categorycode : $borcat;
71
}
72
66
73
my $record_processor = Koha::RecordProcessor->new({ filters => 'ViewPolicy' });
67
my $record_processor = Koha::RecordProcessor->new({ filters => 'ViewPolicy' });
74
my $rules = C4::Context->yaml_preference('OpacHiddenItems');
68
my $rules = C4::Context->yaml_preference('OpacHiddenItems');
Lines 95-121 foreach my $biblionumber ( @bibs ) { Link Here
95
    my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
89
    my $marcseriesarray  = GetMarcSeries  ($record,$marcflavour);
96
    my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
90
    my $marcurlsarray    = GetMarcUrls    ($record,$marcflavour);
97
91
98
    # grab all the items...
99
    my @all_items        = &GetItemsInfo( $biblionumber );
100
101
    # determine which ones should be hidden / visible
102
    my @hidden_items     = GetHiddenItemnumbers({ items => \@all_items, borcat => $borcat });
103
104
    # If every item is hidden, then the biblio should be hidden too.
92
    # If every item is hidden, then the biblio should be hidden too.
105
    next
93
    next
106
      if $biblio->hidden_in_opac({ rules => $rules });
94
      if $biblio->hidden_in_opac({ rules => $rules });
107
95
108
    # copy the visible ones into the items array.
96
    # grab all the items...
109
    my @items;
97
    my $items        = $biblio->items->filter_by_visible_in_opac({ patron => $logged_in_user })->unblessed;
110
    foreach my $item (@all_items) {
98
    foreach my $item (@$items) {
111
99
        my $reserve_status = C4::Reserves::GetReserveStatus($item->{itemnumber});
112
            # next if item is hidden
100
        if( $reserve_status eq "Waiting"){ $item->{'waiting'} = 1; }
113
            next  if  grep  { $item->{itemnumber} eq $_  } @hidden_items ;
101
        if( $reserve_status eq "Reserved"){ $item->{'onhold'} = 1; }
114
115
            my $reserve_status = C4::Reserves::GetReserveStatus($item->{itemnumber});
116
            if( $reserve_status eq "Waiting"){ $item->{'waiting'} = 1; }
117
            if( $reserve_status eq "Reserved"){ $item->{'onhold'} = 1; }
118
            push @items, $item;
119
    }
102
    }
120
103
121
    my $hasauthors = 0;
104
    my $hasauthors = 0;
Lines 137-143 foreach my $biblionumber ( @bibs ) { Link Here
137
        $dat->{'even'} = 1;
120
        $dat->{'even'} = 1;
138
    }
121
    }
139
122
140
    for my $itm (@items) {
123
    for my $itm (@$items) {
141
        if ($itm->{'location'}){
124
        if ($itm->{'location'}){
142
            $itm->{'location_opac'} = $shelflocations->{$itm->{'location'} };
125
            $itm->{'location_opac'} = $shelflocations->{$itm->{'location'} };
143
        }
126
        }
Lines 150-156 foreach my $biblionumber ( @bibs ) { Link Here
150
    }
133
    }
151
    $num++;
134
    $num++;
152
    $dat->{biblionumber} = $biblionumber;
135
    $dat->{biblionumber} = $biblionumber;
153
    $dat->{ITEM_RESULTS}   = \@items;
136
    $dat->{ITEM_RESULTS}   = $items;
154
    $dat->{MARCNOTES}      = $marcnotesarray;
137
    $dat->{MARCNOTES}      = $marcnotesarray;
155
    $dat->{MARCSUBJCTS}    = $marcsubjctsarray;
138
    $dat->{MARCSUBJCTS}    = $marcsubjctsarray;
156
    $dat->{MARCAUTHORS}    = $marcauthorsarray;
139
    $dat->{MARCAUTHORS}    = $marcauthorsarray;
(-)a/opac/opac-detail.pl (-15 / +14 lines)
Lines 45-51 use C4::Biblio qw( Link Here
45
    GetMarcSubjects
45
    GetMarcSubjects
46
    GetMarcUrls
46
    GetMarcUrls
47
);
47
);
48
use C4::Items qw( GetHiddenItemnumbers GetItemsInfo );
48
use C4::Items qw( GetItemsInfo );
49
use C4::Circulation qw( GetTransfers );
49
use C4::Circulation qw( GetTransfers );
50
use C4::Tags qw( get_tags );
50
use C4::Tags qw( get_tags );
51
use C4::XISBN qw( get_xisbns );
51
use C4::XISBN qw( get_xisbns );
Lines 109-115 if( $specific_item ) { Link Here
109
    @all_items = grep { $_->{itemnumber} == $query->param('itemnumber') } @all_items;
109
    @all_items = grep { $_->{itemnumber} == $query->param('itemnumber') } @all_items;
110
    $template->param( specific_item => 1 );
110
    $template->param( specific_item => 1 );
111
}
111
}
112
my @hiddenitems;
112
my @items_to_show;
113
my $patron = Koha::Patrons->find( $borrowernumber );
113
my $patron = Koha::Patrons->find( $borrowernumber );
114
114
115
my $biblio = Koha::Biblios->find( $biblionumber );
115
my $biblio = Koha::Biblios->find( $biblionumber );
Lines 127-134 unless ( $patron and $patron->category->override_hidden_items ) { Link Here
127
        exit;
127
        exit;
128
    }
128
    }
129
    if ( scalar @all_items >= 1 ) {
129
    if ( scalar @all_items >= 1 ) {
130
        push @hiddenitems,
130
        @items_to_show = Koha::Items->search( { itemnumber => [ map { $_->{itemnumber} } @all_items ] } )
131
          GetHiddenItemnumbers( { items => \@all_items, borcat => $patron ? $patron->categorycode : undef } );
131
                                    ->filter_by_visible_in_opac( { patron => $patron } )->as_list;
132
    }
132
    }
133
}
133
}
134
134
Lines 252-259 if ($session->param('busc')) { Link Here
252
        my $hits;
252
        my $hits;
253
        my @newresults;
253
        my @newresults;
254
        my $search_context = {
254
        my $search_context = {
255
            'interface' => 'opac',
255
            interface => 'opac',
256
            'category'  => ($patron) ? $patron->categorycode : q{}
256
            patron    => $patron,
257
        };
257
        };
258
        for (my $i=0;$i<@servers;$i++) {
258
        for (my $i=0;$i<@servers;$i++) {
259
            my $server = $servers[$i];
259
            my $server = $servers[$i];
Lines 516-533 if ( C4::Context->preference('EasyAnalyticalRecords') ) { Link Here
516
my @items;
516
my @items;
517
517
518
# Are there items to hide?
518
# Are there items to hide?
519
my $hideitems;
520
$hideitems = 1 if C4::Context->preference('hidelostitems') or scalar(@hiddenitems) > 0;
521
522
# Hide items
519
# Hide items
523
if ($hideitems) {
520
if ( @items_to_show != @all_items ) {
524
    for my $itm (@all_items) {
521
    for my $itm (@all_items) {
525
	if  ( C4::Context->preference('hidelostitems') ) {
522
        next unless any { $itm->{itemnumber} eq $_ } @items_to_show;
526
	    push @items, $itm unless $itm->{itemlost} or any { $itm->{'itemnumber'} eq $_ } @hiddenitems;
523
        if ( C4::Context->preference('hidelostitems') ) {
527
	} else {
524
            push @items, $itm unless $itm->{itemlost};
528
	    push @items, $itm unless any { $itm->{'itemnumber'} eq $_ } @hiddenitems;
525
        }
526
        else {
527
            push @items, $itm;
528
        }
529
    }
529
    }
530
}
531
} else {
530
} else {
532
    # Or not
531
    # Or not
533
    @items = @all_items;
532
    @items = @all_items;
(-)a/opac/opac-search.pl (-1 / +1 lines)
Lines 587-593 my @sup_results_array; Link Here
587
my $search_context = {};
587
my $search_context = {};
588
$search_context->{'interface'} = 'opac';
588
$search_context->{'interface'} = 'opac';
589
if (C4::Context->preference('OpacHiddenItemsExceptions')){
589
if (C4::Context->preference('OpacHiddenItemsExceptions')){
590
    $search_context->{'category'} = $patron ? $patron->categorycode : q{};
590
    $search_context->{patron} = $patron;
591
}
591
}
592
592
593
my $variables = { anonymous_session => ($borrowernumber) ? 0 : 1 };
593
my $variables = { anonymous_session => ($borrowernumber) ? 0 : 1 };
(-)a/opac/opac-tags.pl (-11 / +8 lines)
Lines 34-46 use Modern::Perl; Link Here
34
34
35
use CGI qw ( -utf8 );
35
use CGI qw ( -utf8 );
36
use CGI::Cookie; # need to check cookies before having CGI parse the POST request
36
use CGI::Cookie; # need to check cookies before having CGI parse the POST request
37
use Array::Utils qw( array_minus );
37
38
38
use C4::Auth qw( check_cookie_auth get_template_and_user );
39
use C4::Auth qw( check_cookie_auth get_template_and_user );
39
use C4::Context;
40
use C4::Context;
40
use C4::Output qw( output_with_http_headers is_ajax output_html_with_http_headers );
41
use C4::Output qw( output_with_http_headers is_ajax output_html_with_http_headers );
41
use C4::Scrubber;
42
use C4::Scrubber;
42
use C4::Biblio qw( GetMarcBiblio );
43
use C4::Biblio qw( GetMarcBiblio );
43
use C4::Items qw( GetHiddenItemnumbers GetItemsInfo );
44
use C4::Items qw( GetItemsInfo );
44
use C4::Tags qw(
45
use C4::Tags qw(
45
    add_tag
46
    add_tag
46
    get_approval_rows
47
    get_approval_rows
Lines 226-232 if ($is_ajax) { Link Here
226
227
227
my $results = [];
228
my $results = [];
228
my $my_tags = [];
229
my $my_tags = [];
229
my $borcat  = q{};
230
230
231
if ($loggedinuser) {
231
if ($loggedinuser) {
232
    my $patron = Koha::Patrons->find( { borrowernumber => $loggedinuser } );
232
    my $patron = Koha::Patrons->find( { borrowernumber => $loggedinuser } );
Lines 258-272 if ($loggedinuser) { Link Here
258
            opac         => 1,
258
            opac         => 1,
259
            borcat       => $borcat });
259
            borcat       => $borcat });
260
        next unless $record;
260
        next unless $record;
261
        my $hidden_items = undef;
261
        my @hidden_items;
262
        my @hidden_itemnumbers;
263
        my @all_items;
264
        if ($should_hide) {
262
        if ($should_hide) {
265
            @all_items = GetItemsInfo( $tag->{biblionumber} );
263
            my $items = $biblio->items;
266
            @hidden_itemnumbers = GetHiddenItemnumbers({
264
            my @all_itemnumbers = $items->get_column('itemnumber');
267
                items => \@all_items,
265
            my @items_to_show = $items->filter_by_visible_in_opac({ opac => 1, patron => $patron })->as_list;
268
                borcat => $borcat });
266
            @hidden_items = array_minus( @all_itemnumbers, @items_to_show );
269
            $hidden_items = \@hidden_itemnumbers;
270
        }
267
        }
271
        next
268
        next
272
          if (
269
          if (
Lines 294-300 if ($loggedinuser) { Link Here
294
                record         => $record,
291
                record         => $record,
295
                xsl_syspref    => 'OPACXSLTResultsDisplay',
292
                xsl_syspref    => 'OPACXSLTResultsDisplay',
296
                fix_amps       => 1,
293
                fix_amps       => 1,
297
                hidden_items   => $hidden_items,
294
                hidden_items   => \@hidden_items,
298
                xslt_variables => $variables
295
                xslt_variables => $variables
299
            }
296
            }
300
        );
297
        );
(-)a/t/db_dependent/Items.t (-101 / +1 lines)
Lines 19-25 use Modern::Perl; Link Here
19
use Data::Dumper;
19
use Data::Dumper;
20
20
21
use MARC::Record;
21
use MARC::Record;
22
use C4::Items qw( ModItemTransfer GetHiddenItemnumbers GetItemsInfo SearchItems AddItemFromMarc ModItemFromMarc get_hostitemnumbers_of Item2Marc );
22
use C4::Items qw( ModItemTransfer GetItemsInfo SearchItems AddItemFromMarc ModItemFromMarc get_hostitemnumbers_of Item2Marc );
23
use C4::Biblio qw( GetMarcFromKohaField EmbedItemsInMarcBiblio GetMarcBiblio AddBiblio );
23
use C4::Biblio qw( GetMarcFromKohaField EmbedItemsInMarcBiblio GetMarcBiblio AddBiblio );
24
use C4::Circulation qw( AddIssue );
24
use C4::Circulation qw( AddIssue );
25
use Koha::Items;
25
use Koha::Items;
Lines 190-294 subtest 'ModItemTransfer tests' => sub { Link Here
190
    $schema->storage->txn_rollback;
190
    $schema->storage->txn_rollback;
191
};
191
};
192
192
193
subtest 'GetHiddenItemnumbers tests' => sub {
194
195
    plan tests => 11;
196
197
    # This sub is controlled by the OpacHiddenItems system preference.
198
199
    $schema->storage->txn_begin;
200
201
    my $builder = t::lib::TestBuilder->new;
202
    my $library1 = $builder->build({
203
        source => 'Branch',
204
    });
205
206
    my $library2 = $builder->build({
207
        source => 'Branch',
208
    });
209
    my $itemtype = $builder->build({
210
        source => 'Itemtype',
211
    });
212
213
    # Create a new biblio
214
    t::lib::Mocks::mock_preference('marcflavour', 'MARC21');
215
    my $biblio = $builder->build_sample_biblio();
216
217
    # Add two items
218
    my $item1_itemnumber = $builder->build_sample_item(
219
        {
220
            biblionumber => $biblio->biblionumber,
221
            library      => $library1->{branchcode},
222
            withdrawn    => 1,
223
            itype        => $itemtype->{itemtype}
224
        }
225
    )->itemnumber;
226
    my $item2_itemnumber = $builder->build_sample_item(
227
        {
228
            biblionumber => $biblio->biblionumber,
229
            library      => $library2->{branchcode},
230
            withdrawn    => 0,
231
            itype        => $itemtype->{itemtype}
232
        }
233
    )->itemnumber;
234
    my $opachiddenitems;
235
    my @itemnumbers = ($item1_itemnumber,$item2_itemnumber);
236
    my @hidden;
237
    my @items;
238
    push @items, Koha::Items->find( $item1_itemnumber )->unblessed;
239
    push @items, Koha::Items->find( $item2_itemnumber )->unblessed;
240
241
    # Empty OpacHiddenItems
242
    t::lib::Mocks::mock_preference('OpacHiddenItems','');
243
    ok( !defined( GetHiddenItemnumbers( { items => \@items } ) ),
244
        "Hidden items list undef if OpacHiddenItems empty");
245
246
    # Blank spaces
247
    t::lib::Mocks::mock_preference('OpacHiddenItems','  ');
248
    ok( scalar GetHiddenItemnumbers( { items => \@items } ) == 0,
249
        "Hidden items list empty if OpacHiddenItems only contains blanks");
250
251
    # One variable / value
252
    $opachiddenitems = "
253
        withdrawn: [1]";
254
    t::lib::Mocks::mock_preference( 'OpacHiddenItems', $opachiddenitems );
255
    @hidden = GetHiddenItemnumbers( { items => \@items } );
256
    ok( scalar @hidden == 1, "Only one hidden item");
257
    is( $hidden[0], $item1_itemnumber, "withdrawn=1 is hidden");
258
259
    # One variable, two values
260
    $opachiddenitems = "
261
        withdrawn: [1,0]";
262
    t::lib::Mocks::mock_preference( 'OpacHiddenItems', $opachiddenitems );
263
    @hidden = GetHiddenItemnumbers( { items => \@items } );
264
    ok( scalar @hidden == 2, "Two items hidden");
265
    is_deeply( \@hidden, \@itemnumbers, "withdrawn=1 and withdrawn=0 hidden");
266
267
    # Two variables, a value each
268
    $opachiddenitems = "
269
        withdrawn: [1]
270
        homebranch: [$library2->{branchcode}]
271
    ";
272
    t::lib::Mocks::mock_preference( 'OpacHiddenItems', $opachiddenitems );
273
    @hidden = GetHiddenItemnumbers( { items => \@items } );
274
    ok( scalar @hidden == 2, "Two items hidden");
275
    is_deeply( \@hidden, \@itemnumbers, "withdrawn=1 and homebranch library2 hidden");
276
277
    # Override hidden with patron category
278
    t::lib::Mocks::mock_preference( 'OpacHiddenItemsExceptions', 'S' );
279
    @hidden = GetHiddenItemnumbers( { items => \@items, borcat => 'PT' } );
280
    ok( scalar @hidden == 2, "Two items still hidden");
281
    @hidden = GetHiddenItemnumbers( { items => \@items, borcat => 'S' } );
282
    ok( scalar @hidden == 0, "Two items not hidden");
283
284
    # Valid OpacHiddenItems, empty list
285
    @items = ();
286
    @hidden = GetHiddenItemnumbers( { items => \@items } );
287
    ok( scalar @hidden == 0, "Empty items list, no item hidden");
288
289
    $schema->storage->txn_rollback;
290
};
291
292
subtest 'GetItemsInfo tests' => sub {
193
subtest 'GetItemsInfo tests' => sub {
293
194
294
    plan tests => 9;
195
    plan tests => 9;
295
- 

Return to bug 29697