From 8621fbef3563e181c980f02a7d2c64d1bfa2e034 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 --- .../bootstrap/en/includes/shelfbrowser.inc | 6 +-- .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 44 ++++------------------ .../bootstrap/en/modules/opac-readingrecord.tt | 6 +-- .../opac-tmpl/bootstrap/en/modules/opac-results.tt | 6 +-- .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 6 +-- .../bootstrap/en/modules/opac-showreviews-rss.tt | 6 +-- .../bootstrap/en/modules/opac-showreviews.tt | 6 +-- .../opac-tmpl/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 3795e2eb9f..8a6e24e6c4 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 8d4829ad3f..3fcd3fcc76 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 a3a380fdf6..a091575836 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 fb904159fe..9fa88f7c87 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.11.0