[Koha-bugs] [Bug 5010] Incomplete links in carts and lists sent from the staff client

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Apr 12 03:01:59 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=5010

--- Comment #27 from M. Tompsett <mtompset at hotmail.com> ---
Created attachment 27049
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27049&action=edit
Bug 5010: Fix incomplete links in carts and lists sent from the staff client

While the list email hardcoded http:// in front of the URL, the cart email
was missing http(s)://.

As there seems to be no reliable way to determine in staff
if the OPAC is using SSL or not, this patch introduces a new
OPAC system preference, OpacProtocol, in the Policy subsection.
It defaults to "doesn't use" (http://), but can be changed to
"uses" (https://).

basket/sendbasket.pl was tweaked for OpacProtocol changes.

opac/opac-sendshelf.pl was returned to previous state, because
it affects doc-head-close.inc if OPACBaseURL is not passed. This
should be fixed to use the OpacProtocol system preference in
another bug fix.

virtualshelves/sendshelf.pl was returned to previous
state, because the OpacProtocol logic is now in the
virtualshelves/sendshelf.tt template file.

TEST PLAN
---------
1) Back up your database
2) Drop your koha database and recreate it empty
3) In the mysql client:
   > SOURCE .../installer/data/mysql/sysprefs.sql;
   -- It should run without error.
   > SELECT variable,value from systempreferences WHERE
variable='OpacProtocol';
   -- It should have the value 'http://'
4) Restore your database
5) $ ./installer/data/mysql/updatedatabase.pl
   -- It should run the upgrade to insert OpacProtocol.
6) In the mysql client:
   > SELECT variable,value from systempreferences WHERE
variable='OpacProtocol';
   -- It should have the value 'http://'
7) Log into the staff client
8) Click 'Koha administration'
9) Click 'Global system preferences'
10) Click the 'OPAC' tab on the left side.
11) Scroll down to the Policy section, and find the OpacProtocol
    preference.
    -- It should have a value of "doesn't use" in the drop down.
12) Fill your cart with something(s).
13) Make sure you have a list filled with something(s).
14) Click 'Cart' in the top menu bar area.
15) Click 'Send', and send it to yourself.
16) Click 'Close window'
17) Click 'Hide window'
18) Click 'More' and click 'Lists'
19) Choose a list and 'Send list' to yourself.
20) Check your email
    -- both emails should have OPAC URLs which start with http://
21) Change the OPAC system preference OpacProtocol to
     'uses' (https://), log out and log in (to force refresh of
     cached system preferences), and repeat steps 14 through 19.
22) Check your email
    -- the two new emails should have OPAC URLS which start with
       https://

NOTE: Other URLs may be broken as well, this bug only fixes carts
      and lists sent from staff.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are watching all bug changes.


More information about the Koha-bugs mailing list