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

(-)a/C4/Items.pm (-69 / +23 lines)
Lines 67-73 BEGIN { Link Here
67
        GetItemInfosOf
67
        GetItemInfosOf
68
        GetItemsByBiblioitemnumber
68
        GetItemsByBiblioitemnumber
69
        GetItemsInfo
69
        GetItemsInfo
70
	GetItemsLocationInfo
71
	GetHostItemsInfo
70
	GetHostItemsInfo
72
        GetItemnumbersForBiblio
71
        GetItemnumbersForBiblio
73
        get_itemnumbers_of
72
        get_itemnumbers_of
Lines 1207-1216 sub GetItemsByBiblioitemnumber { Link Here
1207
1206
1208
=head2 GetItemsInfo
1207
=head2 GetItemsInfo
1209
1208
1210
  @results = GetItemsInfo($biblionumber);
1209
  @results = GetItemsInfo($biblionumber, $order_by);
1211
1210
1212
Returns information about items with the given biblionumber.
1211
Returns information about items with the given biblionumber.
1213
1212
1213
The list is ordered by home branch name and some complex criteria
1214
within it (see the code), unless $order_by is specified.
1215
Currently only "cn_sort" is supported.
1216
1214
C<GetItemsInfo> returns a list of references-to-hash. Each element
1217
C<GetItemsInfo> returns a list of references-to-hash. Each element
1215
contains a number of keys. Most of them are attributes from the
1218
contains a number of keys. Most of them are attributes from the
1216
C<biblio>, C<biblioitems>, C<items>, and C<itemtypes> tables in the
1219
C<biblio>, C<biblioitems>, C<items>, and C<itemtypes> tables in the
Lines 1248-1254 If this is set, it is set to C<One Order>. Link Here
1248
=cut
1251
=cut
1249
1252
1250
sub GetItemsInfo {
1253
sub GetItemsInfo {
1251
    my ( $biblionumber ) = @_;
1254
    my ( $biblionumber, $order_by ) = @_;
1255
1252
    my $dbh   = C4::Context->dbh;
1256
    my $dbh   = C4::Context->dbh;
1253
    # note biblioitems.* must be avoided to prevent large marc and marcxml fields from killing performance.
1257
    # note biblioitems.* must be avoided to prevent large marc and marcxml fields from killing performance.
1254
    my $query = "
1258
    my $query = "
Lines 1279-1285 sub GetItemsInfo { Link Here
1279
     LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber
1283
     LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber
1280
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1284
     LEFT JOIN itemtypes   ON   itemtypes.itemtype         = "
1281
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1285
     . (C4::Context->preference('item-level_itypes') ? 'items.itype' : 'biblioitems.itemtype');
1282
    $query .= " WHERE items.biblionumber = ? ORDER BY home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
1286
    $query .= " WHERE items.biblionumber = ? ORDER BY ";
1287
    my $order_by_cause = "home.branchname, items.enumchron, LPAD( items.copynumber, 8, '0' ), items.dateaccessioned DESC" ;
1288
    if ($order_by) {
1289
        if ($order_by eq 'cn_sort') {
1290
            $order_by_cause = "cn_sort ASC";
1291
        }
1292
        else {
1293
            warn qq{Unsupported order by "$order_by"};
1294
        }
1295
    }
1296
    $query .= $order_by_cause;
1297
1283
    my $sth = $dbh->prepare($query);
1298
    my $sth = $dbh->prepare($query);
1284
    $sth->execute($biblionumber);
1299
    $sth->execute($biblionumber);
1285
    my $i = 0;
1300
    my $i = 0;
Lines 1341-1346 sub GetItemsInfo { Link Here
1341
        if ( my $code = C4::Koha::GetAuthValCode( 'items.stack', $data->{frameworkcode} ) ) {
1356
        if ( my $code = C4::Koha::GetAuthValCode( 'items.stack', $data->{frameworkcode} ) ) {
1342
            $data->{stack}          = C4::Koha::GetKohaAuthorisedValueLib( $code, $data->{stack} );
1357
            $data->{stack}          = C4::Koha::GetKohaAuthorisedValueLib( $code, $data->{stack} );
1343
        }
1358
        }
1359
1360
        $data->{location_intranet} = GetKohaAuthorisedValueLib('LOC', $data->{location});
1361
        $data->{location_opac}     = GetKohaAuthorisedValueLib('LOC', $data->{location}, 1);
1362
1344
        # Find the last 3 people who borrowed this item.
1363
        # Find the last 3 people who borrowed this item.
1345
        my $sth2 = $dbh->prepare("SELECT * FROM old_issues,borrowers
1364
        my $sth2 = $dbh->prepare("SELECT * FROM old_issues,borrowers
1346
                                    WHERE itemnumber = ?
1365
                                    WHERE itemnumber = ?
Lines 1366-1436 sub GetItemsInfo { Link Here
1366
	}
1385
	}
1367
}
1386
}
1368
1387
1369
=head2 GetItemsLocationInfo
1370
1371
  my @itemlocinfo = GetItemsLocationInfo($biblionumber);
1372
1373
Returns the branch names, shelving location and itemcallnumber for each item attached to the biblio in question
1374
1375
C<GetItemsInfo> returns a list of references-to-hash. Data returned:
1376
1377
=over 2
1378
1379
=item C<$data-E<gt>{homebranch}>
1380
1381
Branch Name of the item's homebranch
1382
1383
=item C<$data-E<gt>{holdingbranch}>
1384
1385
Branch Name of the item's holdingbranch
1386
1387
=item C<$data-E<gt>{location}>
1388
1389
Item's shelving location code
1390
1391
=item C<$data-E<gt>{location_intranet}>
1392
1393
The intranet description for the Shelving Location as set in authorised_values 'LOC'
1394
1395
=item C<$data-E<gt>{location_opac}>
1396
1397
The OPAC description for the Shelving Location as set in authorised_values 'LOC'.  Falls back to intranet description if no OPAC 
1398
description is set.
1399
1400
=item C<$data-E<gt>{itemcallnumber}>
1401
1402
Item's itemcallnumber
1403
1404
=item C<$data-E<gt>{cn_sort}>
1405
1406
Item's call number normalized for sorting
1407
1408
=back
1409
  
1410
=cut
1411
1412
sub GetItemsLocationInfo {
1413
        my $biblionumber = shift;
1414
        my @results;
1415
1416
	my $dbh = C4::Context->dbh;
1417
	my $query = "SELECT a.branchname as homebranch, b.branchname as holdingbranch, 
1418
			    location, itemcallnumber, cn_sort
1419
		     FROM items, branches as a, branches as b
1420
		     WHERE homebranch = a.branchcode AND holdingbranch = b.branchcode 
1421
		     AND biblionumber = ?
1422
		     ORDER BY cn_sort ASC";
1423
	my $sth = $dbh->prepare($query);
1424
        $sth->execute($biblionumber);
1425
1426
        while ( my $data = $sth->fetchrow_hashref ) {
1427
             $data->{location_intranet} = GetKohaAuthorisedValueLib('LOC', $data->{location});
1428
             $data->{location_opac}= GetKohaAuthorisedValueLib('LOC', $data->{location}, 1);
1429
	     push @results, $data;
1430
	}
1431
	return @results;
1432
}
1433
1434
=head2 GetHostItemsInfo
1388
=head2 GetHostItemsInfo
1435
1389
1436
	$hostiteminfo = GetHostItemsInfo($hostfield);
1390
	$hostiteminfo = GetHostItemsInfo($hostfield);
(-)a/C4/Search.pm (-14 / +5 lines)
Lines 1872-1878 sub searchResults { Link Here
1872
        my $items_count           = scalar(@fields);
1872
        my $items_count           = scalar(@fields);
1873
        my $maxitems_pref = C4::Context->preference('maxItemsinSearchResults');
1873
        my $maxitems_pref = C4::Context->preference('maxItemsinSearchResults');
1874
        my $maxitems = $maxitems_pref ? $maxitems_pref - 1 : 1;
1874
        my $maxitems = $maxitems_pref ? $maxitems_pref - 1 : 1;
1875
        my @hiddenitems; # hidden itemnumbers based on OpacHiddenItems syspref
1876
1875
1877
        # loop through every item
1876
        # loop through every item
1878
        foreach my $field (@fields) {
1877
        foreach my $field (@fields) {
Lines 1894-1900 sub searchResults { Link Here
1894
                # hidden based on OpacHiddenItems syspref
1893
                # hidden based on OpacHiddenItems syspref
1895
                my @hi = C4::Items::GetHiddenItemnumbers($item);
1894
                my @hi = C4::Items::GetHiddenItemnumbers($item);
1896
                if (scalar @hi) {
1895
                if (scalar @hi) {
1897
                    push @hiddenitems, @hi;
1898
                    $hideatopac_count++;
1896
                    $hideatopac_count++;
1899
                    next;
1897
                    next;
1900
                }
1898
                }
Lines 1911-1928 sub searchResults { Link Here
1911
                $item->{'branchname'} = $branches{$item->{$otherbranch}};
1909
                $item->{'branchname'} = $branches{$item->{$otherbranch}};
1912
            }
1910
            }
1913
1911
1914
			my $prefix = $item->{$hbranch} . '--' . $item->{location} . $item->{itype} . $item->{itemcallnumber};
1912
            my $prefix = $item->{$hbranch} . '--' . $item->{location} . $item->{itype} . $item->{itemcallnumber};
1915
# For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item
1913
# For each grouping of items (onloan, available, unavailable), we build a key to store relevant info about that item
1916
            my $userenv = C4::Context->userenv;
1914
            my $userenv = C4::Context->userenv;
1917
            if ( $item->{onloan} && !(C4::Members::GetHideLostItemsPreference($userenv->{'number'}) && $item->{itemlost}) ) {
1915
            if ( $item->{onloan} && !(C4::Members::GetHideLostItemsPreference($userenv->{'number'}) && $item->{itemlost}) ) {
1918
                $onloan_count++;
1916
                $onloan_count++;
1919
				my $key = $prefix . $item->{onloan} . $item->{barcode};
1917
				my $key = $prefix . $item->{onloan} . $item->{barcode};
1918
                $onloan_items->{$key} = { %$item };
1920
				$onloan_items->{$key}->{due_date} = format_date($item->{onloan});
1919
				$onloan_items->{$key}->{due_date} = format_date($item->{onloan});
1921
				$onloan_items->{$key}->{count}++ if $item->{$hbranch};
1920
				$onloan_items->{$key}->{count}++ if $item->{$hbranch};
1922
				$onloan_items->{$key}->{branchname} = $item->{branchname};
1923
				$onloan_items->{$key}->{location} = $shelflocations->{ $item->{location} };
1921
				$onloan_items->{$key}->{location} = $shelflocations->{ $item->{location} };
1924
				$onloan_items->{$key}->{itemcallnumber} = $item->{itemcallnumber};
1925
				$onloan_items->{$key}->{description} = $item->{description};
1926
				$onloan_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
1922
				$onloan_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
1927
                # if something's checked out and lost, mark it as 'long overdue'
1923
                # if something's checked out and lost, mark it as 'long overdue'
1928
                if ( $item->{itemlost} ) {
1924
                if ( $item->{itemlost} ) {
Lines 2002-2026 sub searchResults { Link Here
2002
                    $other_count++;
1998
                    $other_count++;
2003
1999
2004
                    my $key = $prefix . $item->{status};
2000
                    my $key = $prefix . $item->{status};
2005
                    foreach (qw(withdrawn itemlost damaged branchname itemcallnumber)) {
2001
                    $other_items->{$key} = { %$item };
2006
                        $other_items->{$key}->{$_} = $item->{$_};
2007
                    }
2008
                    $other_items->{$key}->{intransit} = ( $transfertwhen ne '' ) ? 1 : 0;
2002
                    $other_items->{$key}->{intransit} = ( $transfertwhen ne '' ) ? 1 : 0;
2009
                    $other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0;
2003
                    $other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0;
2010
                    $other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value and $item->{notforloan};
2004
                    $other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value and $item->{notforloan};
2011
					$other_items->{$key}->{count}++ if $item->{$hbranch};
2005
					$other_items->{$key}->{count}++ if $item->{$hbranch};
2012
					$other_items->{$key}->{location} = $shelflocations->{ $item->{location} };
2006
					$other_items->{$key}->{location} = $shelflocations->{ $item->{location} };
2013
					$other_items->{$key}->{description} = $item->{description};
2014
					$other_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
2007
					$other_items->{$key}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
2015
                }
2008
                }
2016
                # item is available
2009
                # item is available
2017
                else {
2010
                else {
2018
                    $can_place_holds = 1;
2011
                    $can_place_holds = 1;
2019
                    $available_count++;
2012
                    $available_count++;
2013
                    $available_items->{$prefix} = { %$item };
2020
					$available_items->{$prefix}->{count}++ if $item->{$hbranch};
2014
					$available_items->{$prefix}->{count}++ if $item->{$hbranch};
2021
					foreach (qw(branchname itemcallnumber description)) {
2022
                    	$available_items->{$prefix}->{$_} = $item->{$_};
2023
					}
2024
					$available_items->{$prefix}->{location} = $shelflocations->{ $item->{location} };
2015
					$available_items->{$prefix}->{location} = $shelflocations->{ $item->{location} };
2025
					$available_items->{$prefix}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
2016
					$available_items->{$prefix}->{imageurl} = getitemtypeimagelocation( $search_context, $itemtypes{ $item->{itype} }->{imageurl} );
2026
                }
2017
                }
Lines 2052-2058 sub searchResults { Link Here
2052
        warn $marcrecord->as_formatted if $DEBUG;
2043
        warn $marcrecord->as_formatted if $DEBUG;
2053
	my $interface = $search_context eq 'opac' ? 'OPAC' : '';
2044
	my $interface = $search_context eq 'opac' ? 'OPAC' : '';
2054
	if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) {
2045
	if (!$scan && C4::Context->preference($interface . "XSLTResultsDisplay")) {
2055
            $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $interface."XSLTResultsDisplay", 1, \@hiddenitems);
2046
            $oldbiblio->{XSLTResultsRecord} = XSLTParse4Display($oldbiblio->{biblionumber}, $marcrecord, $interface."XSLTResultsDisplay", [@available_items_loop, @onloan_items_loop, @other_items_loop], 1);
2056
	    # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs
2047
	    # the last parameter tells Koha to clean up the problematic ampersand entities that Zebra outputs
2057
        }
2048
        }
2058
2049
(-)a/C4/VirtualShelves/Page.pm (-4 / +4 lines)
Lines 261-271 sub shelfpage { Link Here
261
                ( $items, $totitems ) = GetShelfContents( $shelfnumber, $shelflimit, $shelfoffset, $sortfield, $direction );
261
                ( $items, $totitems ) = GetShelfContents( $shelfnumber, $shelflimit, $shelfoffset, $sortfield, $direction );
262
                for my $this_item (@$items) {
262
                for my $this_item (@$items) {
263
                    my $biblionumber = $this_item->{'biblionumber'};
263
                    my $biblionumber = $this_item->{'biblionumber'};
264
                    # Getting items infos for location display
265
                    my @items_infos = &GetItemsInfo( $this_item->{'biblionumber'}, "cn_sort" );
264
                    my $record = GetMarcBiblio($biblionumber);
266
                    my $record = GetMarcBiblio($biblionumber);
265
                    if (C4::Context->preference("OPACXSLTResultsDisplay") && $type eq 'opac') {
267
                    if (C4::Context->preference("OPACXSLTResultsDisplay") && $type eq 'opac') {
266
                        $this_item->{XSLTBloc} = XSLTParse4Display($biblionumber, $record, "OPACXSLTResultsDisplay");
268
                        $this_item->{XSLTBloc} = XSLTParse4Display($biblionumber, $record, "OPACXSLTResultsDisplay", \@items_infos);
267
                    } elsif (C4::Context->preference("XSLTResultsDisplay") && $type eq 'intranet') {
269
                    } elsif (C4::Context->preference("XSLTResultsDisplay") && $type eq 'intranet') {
268
                        $this_item->{XSLTBloc} = XSLTParse4Display($biblionumber, $record, "XSLTResultsDisplay");
270
                        $this_item->{XSLTBloc} = XSLTParse4Display($biblionumber, $record, "XSLTResultsDisplay", \@items_infos);
269
                    }
271
                    }
270
272
271
                    # the virtualshelfcontents table does not store these columns nor are they retrieved from the items
273
                    # the virtualshelfcontents table does not store these columns nor are they retrieved from the items
Lines 281-288 sub shelfpage { Link Here
281
                    $this_item->{'normalized_oclc'} = GetNormalizedOCLCNumber($record,$marcflavour);
283
                    $this_item->{'normalized_oclc'} = GetNormalizedOCLCNumber($record,$marcflavour);
282
                    $this_item->{'normalized_isbn'} = GetNormalizedISBN(undef,$record,$marcflavour);
284
                    $this_item->{'normalized_isbn'} = GetNormalizedISBN(undef,$record,$marcflavour);
283
                    if(!defined($this_item->{'size'})) { $this_item->{'size'} = "" }; #TT has problems with size
285
                    if(!defined($this_item->{'size'})) { $this_item->{'size'} = "" }; #TT has problems with size
284
                    # Getting items infos for location display
285
                    my @items_infos = &GetItemsLocationInfo( $this_item->{'biblionumber'});
286
                    $this_item->{'itemsissued'} = CountItemsIssued( $this_item->{'biblionumber'} );
286
                    $this_item->{'itemsissued'} = CountItemsIssued( $this_item->{'biblionumber'} );
287
                    $this_item->{'ITEM_RESULTS'} = \@items_infos;
287
                    $this_item->{'ITEM_RESULTS'} = \@items_infos;
288
                    if ( grep {$_ eq $biblionumber} @cart_list) {
288
                    if ( grep {$_ eq $biblionumber} @cart_list) {
(-)a/C4/XSLT.pm (-10 / +13 lines)
Lines 156-163 sub _get_best_default_xslt_filename { Link Here
156
    return $xslfilename;
156
    return $xslfilename;
157
}
157
}
158
158
159
=head2 XSLTParse4Display( $biblionumber, $orig_record, $xslsyspref, $items, $fixamps )
160
161
  $items => an array of items rerords, as returned from eg. GetItemsInfo
162
163
Returns XSLT block
164
165
=cut
166
159
sub XSLTParse4Display {
167
sub XSLTParse4Display {
160
    my ( $biblionumber, $orig_record, $xslsyspref, $fixamps, $hidden_items ) = @_;
168
    my ( $biblionumber, $orig_record, $xslsyspref, $items, $fixamps ) = @_;
169
161
    my $xslfilename = C4::Context->preference($xslsyspref);
170
    my $xslfilename = C4::Context->preference($xslsyspref);
162
    if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) {
171
    if ( $xslfilename =~ /^\s*"?default"?\s*$/i ) {
163
        my $htdocs;
172
        my $htdocs;
Lines 195-201 sub XSLTParse4Display { Link Here
195
204
196
    # grab the XML, run it through our stylesheet, push it out to the browser
205
    # grab the XML, run it through our stylesheet, push it out to the browser
197
    my $record = transformMARCXML4XSLT($biblionumber, $orig_record);
206
    my $record = transformMARCXML4XSLT($biblionumber, $orig_record);
198
    my $itemsxml  = buildKohaItemsNamespace($biblionumber, $hidden_items);
207
    my $itemsxml  = $items ? buildKohaItemsNamespace($biblionumber, $items) : "";
199
    my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
208
    my $xmlrecord = $record->as_xml(C4::Context->preference('marcflavour'));
200
    my $sysxml = "<sysprefs>\n";
209
    my $sysxml = "<sysprefs>\n";
201
    foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow
210
    foreach my $syspref ( qw/ hidelostitems OPACURLOpenInNewWindow
Lines 236-248 Is only used in this module currently. Link Here
236
=cut
245
=cut
237
246
238
sub buildKohaItemsNamespace {
247
sub buildKohaItemsNamespace {
239
    my ($biblionumber, $hidden_items) = @_;
248
    my ($biblionumber, $items) = @_;
240
241
    my @items = C4::Items::GetItemsInfo($biblionumber);
242
    if ($hidden_items && @$hidden_items) {
243
        my %hi = map {$_ => 1} @$hidden_items;
244
        @items = grep { !$hi{$_->{itemnumber}} } @items;
245
    }
246
249
247
    my $shelflocations = GetKohaAuthorisedValues('items.location',GetFrameworkCode($biblionumber), 'opac');
250
    my $shelflocations = GetKohaAuthorisedValues('items.location',GetFrameworkCode($biblionumber), 'opac');
248
    my $ccodes         = GetKohaAuthorisedValues('items.ccode',GetFrameworkCode($biblionumber), 'opac');
251
    my $ccodes         = GetKohaAuthorisedValues('items.ccode',GetFrameworkCode($biblionumber), 'opac');
Lines 252-258 sub buildKohaItemsNamespace { Link Here
252
    my $location = "";
255
    my $location = "";
253
    my $ccode = "";
256
    my $ccode = "";
254
    my $xml = '';
257
    my $xml = '';
255
    for my $item (@items) {
258
    for my $item (@$items) {
256
        my $status;
259
        my $status;
257
260
258
        my ( $transfertwhen, $transfertfrom, $transfertto ) = C4::Circulation::GetTransfers($item->{itemnumber});
261
        my ( $transfertwhen, $transfertfrom, $transfertto ) = C4::Circulation::GetTransfers($item->{itemnumber});
(-)a/catalogue/detail.pl (-6 / +6 lines)
Lines 84-95 my $fw = GetFrameworkCode($biblionumber); Link Here
84
my $showallitems = $query->param('showallitems');
84
my $showallitems = $query->param('showallitems');
85
my $marcflavour  = C4::Context->preference("marcflavour");
85
my $marcflavour  = C4::Context->preference("marcflavour");
86
86
87
# XSLT processing of some stuff
88
if (C4::Context->preference("XSLTDetailsDisplay") ) {
89
    $template->param('XSLTDetailsDisplay' =>'1',
90
        'XSLTBloc' => XSLTParse4Display($biblionumber, $record, "XSLTDetailsDisplay") );
91
}
92
93
$template->param( 'SpineLabelShowPrintOnBibDetails' => C4::Context->preference("SpineLabelShowPrintOnBibDetails") );
87
$template->param( 'SpineLabelShowPrintOnBibDetails' => C4::Context->preference("SpineLabelShowPrintOnBibDetails") );
94
$template->param( ocoins => GetCOinSBiblio($record) );
88
$template->param( ocoins => GetCOinSBiblio($record) );
95
89
Lines 137-142 if (@hostitems){ Link Here
137
	push (@items,@hostitems);
131
	push (@items,@hostitems);
138
}
132
}
139
133
134
# XSLT processing of some stuff
135
if (C4::Context->preference("XSLTDetailsDisplay") ) {
136
    $template->param('XSLTDetailsDisplay' =>'1',
137
        'XSLTBloc' => XSLTParse4Display($biblionumber, $record, "XSLTDetailsDisplay", \@all_items) );
138
}
139
140
my $dat = &GetBiblioData($biblionumber);
140
my $dat = &GetBiblioData($biblionumber);
141
141
142
#coping with subscriptions
142
#coping with subscriptions
(-)a/opac/opac-detail.pl (-6 / +5 lines)
Lines 140-150 SetUTF8Flag($record); Link Here
140
my $marcflavour      = C4::Context->preference("marcflavour");
140
my $marcflavour      = C4::Context->preference("marcflavour");
141
my $ean = GetNormalizedEAN( $record, $marcflavour );
141
my $ean = GetNormalizedEAN( $record, $marcflavour );
142
142
143
# XSLT processing of some stuff
144
if (C4::Context->preference("OPACXSLTDetailsDisplay") ) {
145
    $template->param( 'XSLTBloc' => XSLTParse4Display($biblionumber, $record, "OPACXSLTDetailsDisplay" ) );
146
}
147
148
my $OpacBrowseResults = C4::Context->preference("OpacBrowseResults");
143
my $OpacBrowseResults = C4::Context->preference("OpacBrowseResults");
149
$template->{VARS}->{'OpacBrowseResults'} = $OpacBrowseResults;
144
$template->{VARS}->{'OpacBrowseResults'} = $OpacBrowseResults;
150
145
Lines 483-488 if ($hideitems) { Link Here
483
    @items = @all_items;
478
    @items = @all_items;
484
}
479
}
485
480
481
# XSLT processing of some stuff
482
if (C4::Context->preference("OPACXSLTDetailsDisplay") ) {
483
    $template->param( 'XSLTBloc' => XSLTParse4Display($biblionumber, $record, "OPACXSLTDetailsDisplay", \@items) );
484
}
485
486
my $branches = GetBranches();
486
my $branches = GetBranches();
487
my $branch = '';
487
my $branch = '';
488
if (C4::Context->userenv){
488
if (C4::Context->userenv){
489
- 

Return to bug 11213