From b6cf429827da2c8ca0e8d0827e85355a8ae9b5de Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 14 Dec 2018 17:20:52 -0300 Subject: [PATCH] Bug 22007: Remove html filters when KohaDates called with a parameter Bug 13618 took care of the KohaDates output but not if it is called with a parameter (eg. [% var | $KohaDates with_hours => 1 %]). We could avoid unnecessary processing by removing the extra html filter. Patch generated with the following command: % perl -p -i -e 's/KohaDates([^%\|]*)\s?\|\s?html\s?/KohaDates $1/g' **/*.inc **/*.tt Signed-off-by: Owen Leonard Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens (cherry picked from commit 5d49ea039c981ee73085c70b326ea47c29bee0ba) Signed-off-by: Martin Renvoize --- koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 2 +- .../prog/en/modules/acqui/addorderiso2709.tt | 4 ++-- .../intranet-tmpl/prog/en/modules/acqui/lateorders.tt | 2 +- .../prog/en/modules/catalogue/issuehistory.tt | 8 ++++---- .../prog/en/modules/catalogue/search-history.tt | 8 ++++---- koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt | 2 +- .../intranet-tmpl/prog/en/modules/circ/circulation.tt | 2 +- .../intranet-tmpl/prog/en/modules/ill/ill-requests.tt | 4 ++-- .../prog/en/modules/members/accountline-details.tt | 4 ++-- .../prog/en/modules/members/moremember-print.tt | 2 +- .../intranet-tmpl/prog/en/modules/members/notices.tt | 2 +- .../intranet-tmpl/prog/en/modules/members/readingrec.tt | 8 ++++---- .../prog/en/modules/reports/guided_reports_start.tt | 4 ++-- .../intranet-tmpl/prog/en/modules/reserve/request.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-course-details.tt | 2 +- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-memberentry.tt | 2 +- .../opac-tmpl/bootstrap/en/modules/opac-search-history.tt | 8 ++++---- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 6 +++--- koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 4 ++-- 20 files changed, 39 insertions(+), 39 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt index bffb1eae3d..8c0128a149 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -114,7 +114,7 @@ [% END %] Date and time: - [% current_date_and_time | $KohaDates with_hours => 1 | html %] + [% current_date_and_time | $KohaDates with_hours => 1 %] [% timezone_config_class = (time_zone.config_invalid) ? 'status_warn' : '' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt index 54a701103f..b98175a1d0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/addorderiso2709.tt @@ -31,7 +31,7 @@ [% IF ( batch_details ) %]

Add orders from [% comments | html %] - ([% file_name | html %] staged on [% upload_timestamp | $KohaDates with_hours => 1 | html %]) + ([% file_name | html %] staged on [% upload_timestamp | $KohaDates with_hours => 1 %])

@@ -411,7 +411,7 @@ [% batch_lis.import_status | html %] [% END %] - [% batch_lis.staged_date | $KohaDates with_hours => 1 | html %] + [% batch_lis.staged_date | $KohaDates with_hours => 1 %] [% batch_lis.num_records | html %] Add orders diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt index 637686b7ff..196d76b58e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt @@ -81,7 +81,7 @@ [% IF ( lateorder.estimateddeliverydate ) %] - [% lateorder.estimateddeliverydate | $KohaDates | html %] + [% lateorder.estimateddeliverydate | $KohaDates %] [% ELSE %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt index 0b0ce8019a..639c694497 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt @@ -66,23 +66,23 @@   [% END %] [% IF checkout.renewals %] - Yes[% IF checkout.lastreneweddate %], last on: [% checkout.lastreneweddate |$KohaDates with_hours => 1 | html %] + Yes[% IF checkout.lastreneweddate %], last on: [% checkout.lastreneweddate |$KohaDates with_hours => 1 %] [% END %] [% ELSE %] No [% END %] [% IF checkout.issuedate %] - [% checkout.issuedate |$KohaDates with_hours => 1 | html %] + [% checkout.issuedate |$KohaDates with_hours => 1 %] [% ELSE %] [% END %] [% IF checkout.date_due %] - [% checkout.date_due |$KohaDates with_hours => 1 | html %] + [% checkout.date_due |$KohaDates with_hours => 1 %] [% ELSE %] [% END %] [% IF checkout.returndate %] - [% checkout.returndate |$KohaDates with_hours => 1 | html %] + [% checkout.returndate |$KohaDates with_hours => 1 %] [% ELSE %] Checked out [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt index 389d8f95b2..f360c1d40d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/search-history.tt @@ -56,7 +56,7 @@ [% FOREACH s IN current_biblio_searches %] - [% s.time |$KohaDates with_hours => 1 | html %] + [% s.time |$KohaDates with_hours => 1 %] [% s.query_desc | html %] [% s.total | html %] @@ -93,7 +93,7 @@ [% FOREACH s IN previous_biblio_searches %] - [% s.time |$KohaDates with_hours => 1 | html %] + [% s.time |$KohaDates with_hours => 1 %] [% s.query_desc | html %] [% s.total | html %] @@ -136,7 +136,7 @@ [% FOREACH s IN current_authority_searches %] - [% s.time |$KohaDates with_hours => 1 | html %] + [% s.time |$KohaDates with_hours => 1 %] [% s.query_desc | html %] [% s.total | html %] @@ -173,7 +173,7 @@ [% FOREACH s IN previous_authority_searches %] - [% s.time |$KohaDates with_hours => 1 | html %] + [% s.time |$KohaDates with_hours => 1 %] [% s.query_desc | html %] [% s.total | html %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt index 51060d672b..57f54a89cc 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/bookcount.tt @@ -49,7 +49,7 @@ [% library.branchname | html %] [% library.issues | html %] [% IF library.seen %] - [% library.seen | $KohaDates with_hours => 1 | html %] + [% library.seen | $KohaDates with_hours => 1 %] [% ELSE %] Never [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt index 6700b0e581..3c5a777dc9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt @@ -1020,7 +1020,7 @@ No patron matched [% message | html %] // On-site checkout function toggle_onsite_checkout(){ if ( $("#onsite_checkout").prop('checked') ) { - $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1 | html %]") + $("#duedatespec").val("[% todaysdate | $KohaDates with_hours => 1 %]") [% IF !Koha.Preference('SpecifyDueDate') %] $("#duedatespec").datetimepicker('destroy'); [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt index f2a833f4f0..a004540065 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/ill/ill-requests.tt @@ -449,7 +449,7 @@
  • - [% request.updated | $KohaDates with_hours => 1 | html %] + [% request.updated | $KohaDates with_hours => 1 %]
  • @@ -559,7 +559,7 @@
  • Last updated: - [% request.updated | $KohaDates with_hours => 1 | html %] + [% request.updated | $KohaDates with_hours => 1 %]
  • Request type: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt index ae66f7ed52..48292b55f6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt @@ -108,13 +108,13 @@ [% IF offset_accountline %] [% offset_accountline.date | $KohaDates %] - [% offset_accountline.timestamp | $KohaDates with_hours => 1 | html %] + [% offset_accountline.timestamp | $KohaDates with_hours => 1 %] [% offset_accountline.amount | $Price %] [% offset_accountline.amountoutstanding | $Price %] [% PROCESS account_type_description account=offset_accountline %] [% offset_accountline.note | html %] [% IF offset_accountline.manager_id %][% offset_accountline.manager_id | html %][% END %] - [% ao.created_on | $KohaDates with_hours => 1 | html %] + [% ao.created_on | $KohaDates with_hours => 1 %] [% ao.amount | $Price %] [% PROCESS offset_type_description account_offset=ao %] Details diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt index 3df5ab4ee5..dcf0cb4a33 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember-print.tt @@ -56,7 +56,7 @@ [% issue.author | html %] [% issue.itemcallnumber | html %] [% issue.itemtype_description | html %] - [% issue.date_due | $KohaDates as_due_date => 1 | html %] + [% issue.date_due | $KohaDates as_due_date => 1 %] [% issue.barcode | html %] [% issue.charge | html %] [% issue.replacementprice | html %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt index 84bd4554de..649026da91 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt @@ -73,7 +73,7 @@
  • [% END %] - [% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 | html %] + [% QUEUED_MESSAGE.time_queued | $KohaDates with_hours => 1 %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt index dcc722ca42..1a499b5244 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt @@ -70,7 +70,7 @@ [% issuetype | html %] - [% issue.issuestimestamp | $KohaDates with_hours => 1 | html %] + [% issue.issuestimestamp | $KohaDates with_hours => 1 %] [% issue.title | html %] @@ -87,19 +87,19 @@ [% issue.barcode | html %] [% issue.renewals | html %] - [% issue.issuedate |$KohaDates with_hours => 1 | html %] + [% issue.issuedate |$KohaDates with_hours => 1 %] [% Branches.GetName( issue.branchcode ) | html %] [% IF issue.date_due %] - [% issue.date_due |$KohaDates with_hours => 1 | html %] + [% issue.date_due |$KohaDates with_hours => 1 %] [% ELSE %] [% END %] [% IF issue.returndate %] - [% issue.returndate |$KohaDates with_hours => 1 | html %] + [% issue.returndate |$KohaDates with_hours => 1 %] [% ELSE %] Checked out [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt index 8a219131c3..18410c2be1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt @@ -223,8 +223,8 @@ canned reports and writing custom SQL reports.

    [% savedreport.notes | html %] [% savedreport.borrowersurname | html %][% IF ( savedreport.borrowerfirstname ) %], [% savedreport.borrowerfirstname | html %][% END %] ([% savedreport.borrowernumber | html %]) [% savedreport.date_created | $KohaDates %] - [% savedreport.last_modified | $KohaDates with_hours => 1 | html %] - [% savedreport.last_run | $KohaDates with_hours => 1 | html %] + [% savedreport.last_modified | $KohaDates with_hours => 1 %] + [% savedreport.last_run | $KohaDates with_hours => 1 %] [% IF (savedreport.public) %] Yes diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt index 2b08c1aca7..9ed0bd84a5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -383,7 +383,7 @@ [% END %] [% IF ( itemloo.onloan ) %] - Due [% itemloo.date_due | $KohaDates as_due_date => 1 | html %] + Due [% itemloo.date_due | $KohaDates as_due_date => 1 %] [% ELSE %] [% IF ( itemloo.transfertwhen ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt index 150721d3bd..1e90cf88a9 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt @@ -76,7 +76,7 @@ [% cr.item.itemcallnumber | html %] [% cr.item.copynumber | html %] [% INCLUDE 'item-status.inc' item=cr.item issue=cr.issue %] - [% cr.issue.date_due | $KohaDates as_due_date => 1 | html %] + [% cr.issue.date_due | $KohaDates as_due_date => 1 %] [% IF ( cr.public_note ) %] [% cr.public_note | html %] [% ELSIF ( cr.item.itemnotes ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index 4c3641b78f..955a2f4a36 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1339,7 +1339,7 @@ [% IF ( itemdata_copynumber ) %][% ITEM_RESULT.copynumber | html %][% END %] [% INCLUDE 'item-status-schema-org.inc' item = ITEM_RESULT %][% INCLUDE 'item-status.inc' item = ITEM_RESULT %] [% IF ( itemdata_itemnotes ) %][% ITEM_RESULT.itemnotes | html %][% END %] - [% ITEM_RESULT.datedue | $KohaDates as_due_date => 1 | html %] + [% ITEM_RESULT.datedue | $KohaDates as_due_date => 1 %] [% ITEM_RESULT.barcode | html %] [% IF holds_count.defined || show_priority %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt index 3628f10eeb..7d238ed7cd 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt @@ -171,7 +171,7 @@ [% UNLESS hidden.defined('dateexpiry') %]
  • - [% borrower.dateexpiry | $KohaDates | html %] + [% borrower.dateexpiry | $KohaDates %]
  • [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt index cb1277ee73..ff9f72d5cd 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt @@ -70,7 +70,7 @@ [% FOREACH s IN current_biblio_searches %] - [% s.time |$KohaDates with_hours => 1 | html %] + [% s.time |$KohaDates with_hours => 1 %] Subscribe to this search [% s.query_desc | html %] [% s.total | html %] @@ -110,7 +110,7 @@ [% FOREACH s IN previous_biblio_searches %] - [% s.time |$KohaDates with_hours => 1 | html %] + [% s.time |$KohaDates with_hours => 1 %] Subscribe to this search [% s.query_desc | html %] [% s.total | html %] @@ -155,7 +155,7 @@ [% FOREACH s IN current_authority_searches %] - [% s.time |$KohaDates with_hours => 1 | html %] + [% s.time |$KohaDates with_hours => 1 %] [% s.query_desc | html %] [% s.total | html %] @@ -192,7 +192,7 @@ [% FOREACH s IN previous_authority_searches %] - [% s.time |$KohaDates with_hours => 1 | html %] + [% s.time |$KohaDates with_hours => 1 %] [% s.query_desc | html %] [% s.total | html %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index bf5738ef14..7af3a0f8c8 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -258,14 +258,14 @@ Date due: - [% ISSUE.date_due | $KohaDates as_due_date => 1 | html %] + [% ISSUE.date_due | $KohaDates as_due_date => 1 %] [% ELSE %] Date due: - [% ISSUE.date_due | $KohaDates as_due_date => 1 | html %] + [% ISSUE.date_due | $KohaDates as_due_date => 1 %] [% END %] @@ -553,7 +553,7 @@ Date due: - [% OVERDUE.date_due | $KohaDates as_due_date => 1 | html %] + [% OVERDUE.date_due | $KohaDates as_due_date => 1 %] [% IF ( OpacRenewalAllowed ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt index fb6ce8c82b..df09322dc4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt @@ -248,9 +248,9 @@ [% ISSUE.itemcallnumber | html %] [% IF ( ISSUE.overdue ) %] - [% ISSUE.date_due | $KohaDates as_due_date => 1 | html %] + [% ISSUE.date_due | $KohaDates as_due_date => 1 %] [% ELSE %] - [% ISSUE.date_due | $KohaDates as_due_date => 1 | html %] + [% ISSUE.date_due | $KohaDates as_due_date => 1 %] [% END %] -- 2.39.5