@@ -, +, @@
client
---
C4/Search.pm | 12 ++++--
.../bug_22695-remove-non-xslt-results.perl | 6 +++
.../admin/preferences/staff_client.pref | 4 +-
.../prog/en/modules/catalogue/results.tt | 39 -------------------
4 files changed, 17 insertions(+), 44 deletions(-)
create mode 100644 installer/data/mysql/atomicupdate/bug_22695-remove-non-xslt-results.perl
--- a/C4/Search.pm
+++ a/C4/Search.pm
@@ -1910,9 +1910,15 @@ sub searchResults {
my ($bibliotag,$bibliosubf)=GetMarcFromKohaField('biblio.biblionumber','');
# set stuff for XSLT processing here once, not later again for every record we retrieved
- my $interface = $is_opac ? 'OPAC' : '';
- my $xslsyspref = $interface . "XSLTResultsDisplay";
- my $xslfile = C4::Context->preference($xslsyspref);
+ 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;
--- a/installer/data/mysql/atomicupdate/bug_22695-remove-non-xslt-results.perl
+++ a/installer/data/mysql/atomicupdate/bug_22695-remove-non-xslt-results.perl
@@ -0,0 +1,6 @@
+$DBversion = 'XXX'; # will be replaced by the RM
+if( CheckVersion( $DBversion ) ) {
+ $dbh->do( "UPDATE systempreferences SET value = 'default' WHERE variable = 'XSLTResultsDisplay' AND value = ''" );
+ SetVersion( $DBversion );
+ print "Upgrade to $DBversion done (Bug 22695 - Remove non-XSLT search results view from the staff client)\n";
+}
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/staff_client.pref
@@ -75,12 +75,12 @@ Staff Client:
- 'Display results in the staff client using XSLT stylesheet at: '
- pref: XSLTResultsDisplay
class: file
- - '
Options:
[% SEARCH_RESULT.result_number | html %]. - [% biblionumber = SEARCH_RESULT.biblionumber %] - - [% INCLUDE 'biblio-default-view.inc' %] - [% IF ( SEARCH_RESULT.title ) %][% SEARCH_RESULT.title | html %][% ELSE %]No title[% END %] - - [% FOREACH subtitl IN SEARCH_RESULT.subtitle %], [% subtitl.subfield | html %][% END %] - [% IF ( SEARCH_RESULT.seriestitle ) %][% SEARCH_RESULT.seriestitle | html %][% END %] - [% IF ( SEARCH_RESULT.volume ) %][% SEARCH_RESULT.volume | html %][% END %] [% IF ( SEARCH_RESULT.volumeddesc ) %], [% SEARCH_RESULT.volumeddesc | html %][% END %] -
- [% IF ( SEARCH_RESULT.summary ) %] - [% IF ( SEARCH_RESULT.author ) %] - [% SEARCH_RESULT.author | html %] - [% ELSE %] - - [% END %] -[% SEARCH_RESULT.summary | html %]
- [% ELSE %] -- [% IF ( SEARCH_RESULT.author ) %] - [% SEARCH_RESULT.author | html %] - [% ELSE %] - - [% END %] - Description: - [% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place | html %] [% END %] - [% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode | html %][% END %] [% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear | html %] [% ELSIF ( SEARCH_RESULT.copyrightdate ) %] [% SEARCH_RESULT.copyrightdate | html %][% END %] - [% IF ( SEARCH_RESULT.edition ) %]Edition: [% SEARCH_RESULT.edition | html %][% END %] - [% IF ( SEARCH_RESULT.pages ) %]: [% SEARCH_RESULT.pages | html %][% END %] - [% IF ( SEARCH_RESULT.size ) %] ; [% SEARCH_RESULT.size | html %][% END %] [% IF ( SEARCH_RESULT.isbn ) %]ISBN: [% SEARCH_RESULT.isbn | replace('\s\|', ', ') | html %][% END %] - [% SEARCH_RESULT.description | html %] - [% IF ( SEARCH_RESULT.timestamp ) %] (modified on [% SEARCH_RESULT.timestamp | html %])[% END %] - [% IF ( SEARCH_RESULT.cn_class ) %][[% SEARCH_RESULT.cn_class | html %]][% END %] -
- [% IF ( SEARCH_RESULT.searchhighlightblob ) %][% SEARCH_RESULT.searchhighlightblob | html %]
[% END %] - [% END %] - [% END %][% IF ( SEARCH_RESULT.norequests ) %] --