[open-ils-commits] [GIT] Evergreen ILS branch master updated. 439bf426083603e8f36f904883fdbd200fce13cf

Evergreen Git git at git.evergreen-ils.org
Fri Feb 1 11:25:07 EST 2013


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, master has been updated
       via  439bf426083603e8f36f904883fdbd200fce13cf (commit)
      from  fbded261a9e82a9135e9e346ceee6cfa3c6e087a (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 439bf426083603e8f36f904883fdbd200fce13cf
Author: Ben Shum <bshum at biblio.org>
Date:   Fri Jan 25 09:37:29 2013 -0500

    TPAC - Add parse_datetime to expire_date
    
    As reported by paxed in IRC, sometimes the function for expire_date has
    troubles and you get an apache internal server error page and log errors
    like:
    
    egweb: template error: date error - bad time/date string:
    expects 'h:m:s d:m:y'  got: '2015-01-31T00:00:00+0200'
    
    Adding the ctx.parse_datetime() function to wrap the ctx.user.expire_date
    resolves this problem.
    
    Signed-off-by: Ben Shum <bshum at biblio.org>
    Signed-off-by: Pasi Kallinen <pasi.kallinen at pttk.fi>

diff --git a/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2 b/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
index dee5662..5cddf45 100644
--- a/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
+++ b/Open-ILS/src/templates/opac/parts/myopac/main_base.tt2
@@ -51,8 +51,8 @@
     <div style="width:662px;">
         <div style="float:left;">
             <div style="padding:10px 0px;">
-            [%- IF date.format(ctx.user.expire_date, '%s') < date.format(date.now , '%s');
-               fmt_expire_date = date.format(ctx.user.expire_date, DATE_FORMAT);
+            [%- IF date.format(ctx.parse_datetime(ctx.user.expire_date), '%s') < date.format(date.now , '%s');
+               fmt_expire_date = date.format(ctx.parse_datetime(ctx.user.expire_date), DATE_FORMAT);
             %]
             <span class="alert">[% l("Your library card expired on [_1]. Please contact a librarian to resolve this issue.", fmt_expire_date) %]</span>
             [% END %]

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

Summary of changes:
 .../src/templates/opac/parts/myopac/main_base.tt2  |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list