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