Bugzilla – Attachment 32603 Details for
Bug 13087
Add a notice for use_zebra_facets problems in about page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 13087: Add a notice for use_zebra_facets problems in about page
Bug-13087-Add-a-notice-for-usezebrafacets-problems.patch (text/plain), 3.22 KB, created by
Tomás Cohen Arazi (tcohen)
on 2014-10-22 19:08:13 UTC
(
hide
)
Description:
Bug 13087: Add a notice for use_zebra_facets problems in about page
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2014-10-22 19:08:13 UTC
Size:
3.22 KB
patch
obsolete
>From 02a5bf242c5625e2aaeefc9b74faac9b9e791c65 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Wed, 22 Oct 2014 15:56:29 -0300 >Subject: [PATCH] Bug 13087: Add a notice for use_zebra_facets problems in > about page > >This patch adds two checks to about.pl: > >- use_zebra_facets entry presence in koha-conf.xml >- use_zebra_facets==1 and zebra_bib_index_mode==dom > >The idea is to alert the user if it has conflicting or wrong settings. Even >if there's a fallback to a working configuration. > >To test: >- On clean master install, go to the about page >=> SUCCESS: No warnings regarding use_zebra_facets >- Comment out the use_zebra_facets entry, reload >=> SUCCESS: The about page mentions the use_zebra_facets entry is missing >- Uncomment the use_zebra_facets entry, make sure it is set to 1 >- Change zebra_bib_index_mode to 'grs1', reload >=> SUCCESS: The about page says zebra_bib_index_mode is not set to DOM even though > you have use_zebra_facets set. >- Sign off :-D > >Regards >To+ > >Sponsored-by: Universidad Nacional de Cordoba >--- > about.pl | 13 +++++++++++++ > koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 14 ++++++++++++++ > 2 files changed, 27 insertions(+) > >diff --git a/about.pl b/about.pl >index d144e37..339f4e2 100755 >--- a/about.pl >+++ b/about.pl >@@ -121,6 +121,19 @@ if ( C4::Context->preference( 'UseQueryParser' ) ) { > } > } > >+# Test Zebra facets configuration >+if ( !defined C4::Context->config('use_zebra_facets') ) { >+ push @xml_config_warnings, { error => 'use_zebra_facets_entry_missing' }; >+} else { >+ if ( C4::Context->config('use_zebra_facets') && >+ C4::Context->config('zebra_bib_index_mode') ) { >+ # use_zebra_facets works with DOM >+ push @xml_config_warnings, { >+ error => 'use_zebra_facets_needs_dom' >+ } if C4::Context->config('zebra_bib_index_mode') ne 'dom' ; >+ } >+} >+ > $template->param( > kohaVersion => $kohaVersion, > osVersion => $osVersion, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >index a5ce2f8..75a367d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt >@@ -155,6 +155,20 @@ > file. <strong>[% config_entry.file %]</strong> is used as a fallback. > </td> > </tr> >+ [% ELSIF config_entry.error == 'use_zebra_facets_entry_missing' %] >+ <tr> >+ <th scope="row"><b>Warning</b></th> >+ <td>The <use_zebra_facets> entry is missing in your configuration file. Falling back >+ to legacy facet calculation. >+ </td> >+ </tr> >+ [% ELSIF config_entry.error == 'use_zebra_facets_needs_dom' %] >+ <tr> >+ <th scope="row"><b>Warning</b></th> >+ <td>You have set <use_zebra_facets> but the <zebra_bib_index_mode> is not set to <strong>dom</strong>. Falling back >+ to legacy facet calculation. >+ </td> >+ </tr> > [% END %] > [% END %] > </table> >-- >1.9.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13087
:
32603
|
32628
|
32652