]> git.evergreen-ils.org Git - Evergreen.git/commit
TPAC: Fallback default value for facet.default_display_count
authorDan Scott <dscott@laurentian.ca>
Sun, 16 Dec 2012 14:09:03 +0000 (09:09 -0500)
committerBen Shum <bshum@biblio.org>
Sun, 23 Dec 2012 18:41:03 +0000 (13:41 -0500)
commit70007ca4cb1740049021eaa9301344c3680100ad
treef0a7acd07574d4f67dcb13e2be02d86c2d63e1ca
parentb389c8c8593230d3ad58a1184a33509685daa7aa
TPAC: Fallback default value for facet.default_display_count

Open-ILS/templates/opac/parts/result/facets.tt2 assigns the value of
facet.default_display_count to DEFAULT_DISPLAY_COUNT and then uses the
latter in a number of comparisons. facet.default_display_count is
expected to be defined in config.tt2; however, on upgrade, sites with
many override templates may not realize that they need to define that
value in config.tt2. If they do not, then the result is a strange facet
display where only the facet category header shows, with no facets, and
Apache error log messages like:

Argument "" isn't numeric in numeric gt (>) at
/openils/var/templates/opac/parts/result/facets.tt2 line 72.

This simple defensive fix assigns a fallback default value if one was
not provided in config.tt2

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/templates/opac/parts/result/facets.tt2