From 40cf253a0df46613340b301a8ce600de2e680a1c Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Thu, 19 Jul 2018 16:57:42 +0000 Subject: [PATCH] Bug 21094: Syndetics: always use https instead of http This patch removes the 'using_https' check in OPAC templates in calls to Syndetics resources. Instead, https is always used. To test, apply the patch and enable Syndetics-related preferences. View the following pages in the OPAC: - Bibliographic detail page - Browse shelf section of the bibliographic detail page - Search results - List contents - Recent comments - Recent comments RSS - User summary page - Circulation history NOTE: I tested with made-up Syndetics credentials. This means my changes didn't make the template explode, but it doesn't confirm conclusively that the resources work. Signed-off-by: John Doe Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 6e0548cc1a7a924731bd414fec2f7917f044040a) Signed-off-by: Martin Renvoize --- .../bootstrap/en/includes/shelfbrowser.inc | 6 +-- .../bootstrap/en/modules/opac-detail.tt | 44 +++---------------- .../en/modules/opac-readingrecord.tt | 6 +-- .../bootstrap/en/modules/opac-results.tt | 6 +-- .../bootstrap/en/modules/opac-shelves.tt | 6 +-- .../en/modules/opac-showreviews-rss.tt | 6 +-- .../bootstrap/en/modules/opac-showreviews.tt | 6 +-- .../bootstrap/en/modules/opac-user.tt | 12 +---- 8 files changed, 16 insertions(+), 76 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc index 2beeb7307c..d435134ce5 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/shelfbrowser.inc @@ -35,11 +35,7 @@ [% IF ( SyndeticsEnabled ) %] [% IF ( SyndeticsCoverImages ) %] [% IF ( content_identifier_exists ) %] - [% IF ( using_https ) %] - - [% ELSE %] - - [% END %] + [% ELSE %] No cover image available [% END %] 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 59aea2958d..2c85b83e00 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -26,11 +26,6 @@ [% END %] [% END %] -[% IF ( using_https ) %] - [% SET protocol = "https://" %] -[% ELSE %] - [% SET protocol = "http://" %] -[% END %] [% INCLUDE 'doc-head-open.inc' %] [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Details for: [% title |html %][% FOREACH subtitl IN subtitle %][% IF Koha.Preference('marcflavour')=='UNIMARC' %],[% END %] [% subtitl.subfield |html %][% END %] [% INCLUDE 'doc-head-close.inc' %] @@ -72,12 +67,7 @@ [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] [% IF ( content_identifier_exists ) %] - [% IF ( using_https ) %] - - [% ELSE %] - - [% END %] - + [% ELSE %] No cover image available [% END %] @@ -448,43 +438,27 @@ [% IF ( SyndeticsSeries && SyndeticsSERIES1Exists ) %] Series information: - [% IF ( using_https ) %] - Click to open in new window - [% ELSE %] - Click to open in new window - [% END %] + Click to open in new window [% END # / IF SyndeticsSeries && SyndeticsSERIES1Exists%] [% IF ( SyndeticsAVPROFILEExists ) %] Audiovisual profile: - [% IF ( using_https ) %] - Click to open in new window - [% ELSE %] - Click to open in new window - [% END %] + Click to open in new window [% END # / IF SyndeticsAVPROFILEExists %] [% IF ( SyndeticsFICTIONExists ) %] - Fiction notes: - [% IF ( using_https ) %] - Click to open in new window - [% ELSE %] - Click to open in new window - [% END %] + Fiction notes: + Click to open in new window [% END # / IF SyndeticsFICTIONExists %] [% IF ( SyndeticsAwards && SyndeticsAWARDS1Exists ) %] Awards: - [% IF ( using_https ) %] - Click to open in new window - [% ELSE %] - Click to open in new window - [% END %] + Click to open in new window [% END # / IF SyndeticsAwards && SyndeticsAWARDS1Exists %] [% END # / IF SyndeticsEnabled%] @@ -997,11 +971,7 @@ [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] [% IF ( XISBN.content_identifier_exists ) %] - [% IF ( using_https ) %] - - [% ELSE %] - - [% END %] + [% ELSE %] No cover image available [% END # / IF XISBN.content_identifier_exists %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt index a51c53e081..4ff3df3944 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt @@ -119,11 +119,7 @@ [% END %] [% IF SyndeticsEnabled && SyndeticsCoverImages %] - [% IF using_https %] - - [% ELSE %] - - [% END %] + [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt index 161acf0f31..151e1cf1f5 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -238,11 +238,7 @@ [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] [% IF ( SEARCH_RESULT.normalized_isbn || SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_oclc ) %] - [% IF ( using_https ) %] - - [% ELSE %] - - [% END %] + [% ELSE %] No cover image available [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt index c122ae23f7..1d992140a6 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt @@ -309,11 +309,7 @@ [% END %] [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] - [% IF ( using_https ) %] - - [% ELSE %] - - [% END %] + [% END %] [% IF ( GoogleJackets ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews-rss.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews-rss.tt index fddf531e7c..2761ba6be7 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews-rss.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews-rss.tt @@ -13,10 +13,8 @@ [% END %][% END %] -[% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( review.content_identifier_exists ) %][% IF ( using_https ) %] -[% ELSE %] - -[% END %][% END %][% END %][% END %] +[% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( review.content_identifier_exists ) %] +[% END %][% END %][% END %] [% bt_id = ( review.normalized_upc || review.normalized_isbn ) %] [% IF ( BakerTaylorEnabled && bt_id ) %]See Baker & Taylor[% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt index 4112c71a3a..efbfcab7b8 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt @@ -126,11 +126,7 @@ [% END %] [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] - [% IF ( using_https ) %] - - [% ELSE %] - - [% END %] + [% END %] [% IF ( GoogleJackets ) %] 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 c1a5bcf26d..487c706e19 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -232,11 +232,7 @@ [% END %] [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] - [% IF ( using_https ) %] - - [% ELSE %] - - [% END %] + [% END %] [% END # / IF JacketImages %] @@ -511,11 +507,7 @@ [% END %] [% IF ( SyndeticsCoverImages ) %] - [% IF ( using_https ) %] - - [% ELSE %] - - [% END %] + [% END %] [% END # /IF jacketcell %] -- 2.39.5