TPAC: Fallback default value for facet.default_display_count user/dbs/lp1090863_default_facet_value
authorDan Scott <dscott@laurentian.ca>
Sun, 16 Dec 2012 14:09:03 +0000 (09:09 -0500)
committerDan Scott <dscott@laurentian.ca>
Sun, 16 Dec 2012 14:09:03 +0000 (09:09 -0500)
commit34427283fa054060ffb2247a2ae2b6161101d1db
treeeb35be6be55b5314adfdf5af0242dad3f562d693
parent81dde022ae39ecff8cbe0cbf7c85c7ce8e49df0f
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>
Open-ILS/src/templates/opac/parts/result/facets.tt2