@@ -, +, @@
---
C4/Auth.pm | 4 -
C4/Search.pm | 59 +------
catalogue/detail.pl | 11 +-
.../en/modules/admin/preferences/opac.pref | 6 +-
.../admin/preferences/staff_interface.pref | 2 +-
.../bootstrap/en/modules/opac-MARCdetail.tt | 8 +-
.../bootstrap/en/modules/opac-detail.tt | 155 +-----------------
.../bootstrap/en/modules/opac-results.tt | 92 +----------
.../bootstrap/en/modules/opac-shelves.tt | 61 +------
opac/opac-detail.pl | 27 +--
opac/opac-shelves.pl | 28 ++--
opac/opac-tags.pl | 30 ++--
virtualshelves/shelves.pl | 10 +-
13 files changed, 54 insertions(+), 439 deletions(-)
--- a/C4/Auth.pm
+++ a/C4/Auth.pm
@@ -492,8 +492,6 @@ sub get_template_and_user {
item_level_itypes => C4::Context->preference('item-level_itypes'),
patronimages => C4::Context->preference("patronimages"),
singleBranchMode => ( Koha::Libraries->search->count == 1 ),
- XSLTDetailsDisplay => C4::Context->preference("XSLTDetailsDisplay"),
- XSLTResultsDisplay => C4::Context->preference("XSLTResultsDisplay"),
noItemTypeImages => C4::Context->preference("noItemTypeImages"),
marcflavour => C4::Context->preference("marcflavour"),
OPACBaseURL => C4::Context->preference('OPACBaseURL'),
@@ -613,8 +611,6 @@ sub get_template_and_user {
suggestion => "" . C4::Context->preference("suggestion"),
virtualshelves => "" . C4::Context->preference("virtualshelves"),
OPACSerialIssueDisplayCount => C4::Context->preference("OPACSerialIssueDisplayCount"),
- OPACXSLTDetailsDisplay => C4::Context->preference("OPACXSLTDetailsDisplay"),
- OPACXSLTResultsDisplay => C4::Context->preference("OPACXSLTResultsDisplay"),
SyndeticsClientCode => C4::Context->preference("SyndeticsClientCode"),
SyndeticsEnabled => C4::Context->preference("SyndeticsEnabled"),
SyndeticsCoverImages => C4::Context->preference("SyndeticsCoverImages"),
--- a/C4/Search.pm
+++ a/C4/Search.pm
@@ -1655,17 +1655,10 @@ sub searchResults {
my ($bibliotag,$bibliosubf)=GetMarcFromKohaField( 'biblio.biblionumber' );
# set stuff for XSLT processing here once, not later again for every record we retrieved
- my $xslfile;
- my $xslsyspref;
- if( $is_opac ){
- $xslsyspref = "OPACXSLTResultsDisplay";
- $xslfile = C4::Context->preference( $xslsyspref );
- } else {
- $xslsyspref = "XSLTResultsDisplay";
- $xslfile = C4::Context->preference( $xslsyspref ) || "default";
- }
- my $lang = $xslfile ? C4::Languages::getlanguage() : undef;
- my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef;
+ my $xslsyspref = $is_opac ? 'OPACXSLTResultsDisplay' : 'XSLTResultsDisplay';
+ my $xslfile = C4::Context->preference( $xslsyspref ) || "default";
+ my $lang = C4::Languages::getlanguage();
+ my $sysxml = C4::XSLT::get_xslt_sysprefs();
my $userenv = C4::Context->userenv;
my $logged_in_user
@@ -1719,50 +1712,6 @@ sub searchResults {
# Build summary if there is one (the summary is defined in the itemtypes table)
$oldbiblio->{description} = $itemtype ? $itemtype->{translated_description} : q{};
- # FIXME: this is only used in the deprecated non-XLST opac results
- if ( !$xslfile && $is_opac && $itemtype && $itemtype->{summary} ) {
- my $summary = $itemtypes{ $oldbiblio->{itemtype} }->{summary};
- my @fields = $marcrecord->fields();
-
- my $newsummary;
- foreach my $line ( "$summary\n" =~ /(.*)\n/g ){
- my $tags = {};
- foreach my $tag ( $line =~ /\[(\d{3}[\w|\d])\]/ ) {
- $tag =~ /(.{3})(.)/;
- if($marcrecord->field($1)){
- my @abc = $marcrecord->field($1)->subfield($2);
- $tags->{$tag} = $#abc + 1 ;
- }
- }
-
- # We catch how many times to repeat this line
- my $max = 0;
- foreach my $tag (keys(%$tags)){
- $max = $tags->{$tag} if($tags->{$tag} > $max);
- }
-
- # we replace, and repeat each line
- for (my $i = 0 ; $i < $max ; $i++){
- my $newline = $line;
-
- foreach my $tag ( $newline =~ /\[(\d{3}[\w|\d])\]/g ) {
- $tag =~ /(.{3})(.)/;
-
- if($marcrecord->field($1)){
- my @repl = $marcrecord->field($1)->subfield($2);
- my $subfieldvalue = $repl[$i];
- $newline =~ s/\[$tag\]/$subfieldvalue/g;
- }
- }
- $newsummary .= "$newline\n";
- }
- }
-
- $newsummary =~ s/\[(.*?)]//g;
- $newsummary =~ s/\n/
/g;
- $oldbiblio->{summary} = $newsummary;
- }
-
# Pull out the items fields
my @fields = $marcrecord->field($itemtag);
my $marcflavor = C4::Context->preference("marcflavour");
--- a/catalogue/detail.pl
+++ a/catalogue/detail.pl
@@ -122,12 +122,11 @@ my $fw = GetFrameworkCode($biblionumber);
my $showallitems = $query->param('showallitems');
my $marcflavour = C4::Context->preference("marcflavour");
-# XSLT processing of some stuff
-my $xslfile = C4::Context->preference('XSLTDetailsDisplay') || "default";
-my $lang = $xslfile ? C4::Languages::getlanguage() : undef;
-my $sysxml = $xslfile ? C4::XSLT::get_xslt_sysprefs() : undef;
-
-if ( $xslfile ) {
+{
+ # XSLT processing of some stuff
+ my $xslfile = C4::Context->preference('XSLTDetailsDisplay') || "default";
+ my $lang = C4::Languages::getlanguage();
+ my $sysxml = C4::XSLT::get_xslt_sysprefs();
my $searcher = Koha::SearchEngine::Search->new(
{ index => $Koha::SearchEngine::BIBLIOS_INDEX }
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
@@ -90,17 +90,17 @@ OPAC:
- 'Display lists in the OPAC using XSLT stylesheet at: '
- pref: OPACXSLTListsDisplay
class: file
- - '
Options: