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

(-)a/C4/Auth.pm (+2 lines)
Lines 333-343 sub get_template_and_user { Link Here
333
                {
333
                {
334
                    borrowernumber => $borrowernumber,
334
                    borrowernumber => $borrowernumber,
335
                    public         => 0,
335
                    public         => 0,
336
                    search_attributes => {order_by => { -asc => 'shelfname' }}
336
                }
337
                }
337
            );
338
            );
338
            my $some_public_shelves = Koha::Virtualshelves->get_some_shelves(
339
            my $some_public_shelves = Koha::Virtualshelves->get_some_shelves(
339
                {
340
                {
340
                    public => 1,
341
                    public => 1,
342
                    search_attributes => {order_by => { -asc => 'shelfname' }}
341
                }
343
                }
342
            );
344
            );
343
            $template->param(
345
            $template->param(
(-)a/Koha/Virtualshelves.pm (-6 / +9 lines)
Lines 191-206 sub get_some_shelves { Link Here
191
        };
191
        };
192
    }
192
    }
193
193
194
    my $default_search_attributes =  {
195
        join => [ 'virtualshelfshares' ],
196
        distinct => 'shelfnumber',
197
        order_by => { -desc => 'lastmodified' },
198
    };
199
200
    my %search_attributes = (%{$default_search_attributes}, %{$params->{search_attributes}});
201
194
    $self->search(
202
    $self->search(
195
        {
203
        {
196
            public => $public,
204
            public => $public,
197
            ( @conditions ? ( -and => \@conditions ) : () ),
205
            ( @conditions ? ( -and => \@conditions ) : () ),
198
        },
206
        },
199
        {
207
        \%search_attributes
200
            join => [ 'virtualshelfshares' ],
201
            distinct => 'shelfnumber',
202
            order_by => { -desc => 'lastmodified' },
203
        }
204
    );
208
    );
205
}
209
}
206
210
207
- 

Return to bug 38712