[open-ils-commits] [GIT] Evergreen ILS branch rel_2_3 updated. e0a4bf8cda8d20c009934d0a76623fea5330cf5a

Evergreen Git git at git.evergreen-ils.org
Sun Dec 23 13:41:47 EST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_3 has been updated
       via  e0a4bf8cda8d20c009934d0a76623fea5330cf5a (commit)
      from  87670e0846606045c5446a2515636b497b414c27 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit e0a4bf8cda8d20c009934d0a76623fea5330cf5a
Author: Dan Scott <dscott at laurentian.ca>
Date:   Sun Dec 16 09:09:03 2012 -0500

    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 at laurentian.ca>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/templates/opac/parts/result/facets.tt2 b/Open-ILS/src/templates/opac/parts/result/facets.tt2
index fed133a..c5b95a0 100644
--- a/Open-ILS/src/templates/opac/parts/result/facets.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/facets.tt2
@@ -8,7 +8,8 @@ selected_facets = CGI.param('facet') || [];
 sorted_facets = [];
 
 # we'll clobber the facet. "namespace" later
-DEFAULT_DISPLAY_COUNT = facet.default_display_count;
+# Provide a default value if unset in config.tt2
+DEFAULT_DISPLAY_COUNT = facet.default_display_count || 5;
 
 IF facet.display;
 

-----------------------------------------------------------------------

Summary of changes:
 .../src/templates/opac/parts/result/facets.tt2     |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list