Lines 1923-1932
sub searchResults {
Link Here
|
1923 |
my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; |
1923 |
my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef; |
1924 |
|
1924 |
|
1925 |
my $userenv = C4::Context->userenv; |
1925 |
my $userenv = C4::Context->userenv; |
1926 |
my $patron = ( defined $userenv and $userenv->{number} ) |
1926 |
my $logged_in_user |
1927 |
? Koha::Patrons->find( $userenv->{number} ) |
1927 |
= ( defined $userenv and $userenv->{number} ) |
1928 |
: undef; |
1928 |
? Koha::Patrons->find( $userenv->{number} ) |
1929 |
my $patron_category_hide_lost_items = ($patron) ? $patron->category->hidelostitems : 0; |
1929 |
: undef; |
|
|
1930 |
my $patron_category_hide_lost_items = ($logged_in_user) ? $logged_in_user->category->hidelostitems : 0; |
1930 |
|
1931 |
|
1931 |
# loop through all of the records we've retrieved |
1932 |
# loop through all of the records we've retrieved |
1932 |
for ( my $i = $offset ; $i <= $times - 1 ; $i++ ) { |
1933 |
for ( my $i = $offset ; $i <= $times - 1 ; $i++ ) { |
Lines 2119-2124
sub searchResults {
Link Here
|
2119 |
my $prefix = $item->{$hbranch} . '--' . $item->{location} . $item->{itype} . $item->{itemcallnumber}; |
2120 |
my $prefix = $item->{$hbranch} . '--' . $item->{location} . $item->{itype} . $item->{itemcallnumber}; |
2120 |
# For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item |
2121 |
# For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item |
2121 |
if ( $item->{onloan} |
2122 |
if ( $item->{onloan} |
|
|
2123 |
and $logged_in_user |
2122 |
and !( $patron_category_hide_lost_items and $item->{itemlost} ) ) |
2124 |
and !( $patron_category_hide_lost_items and $item->{itemlost} ) ) |
2123 |
{ |
2125 |
{ |
2124 |
$onloan_count++; |
2126 |
$onloan_count++; |
2125 |
- |
|
|