Bugzilla – Attachment 9775 Details for
Bug 8155
Comply with UK Electronic Commerce (EC Directive) Regulations 2002
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
bug 8155 - comply with UK Electronic Commerce (EC Directive) Regulations 2002
bug-8155---comply-with-UK-Electronic-Commerce-EC-D.patch (text/plain), 5.81 KB, created by
MJ Ray (software.coop)
on 2012-05-25 11:20:58 UTC
(
hide
)
Description:
bug 8155 - comply with UK Electronic Commerce (EC Directive) Regulations 2002
Filename:
MIME Type:
Creator:
MJ Ray (software.coop)
Created:
2012-05-25 11:20:58 UTC
Size:
5.81 KB
patch
obsolete
>From 42320f29c9fbaa332fa610c8e3e60a6607aaeae7 Mon Sep 17 00:00:00 2001 >From: MJ Ray <mjr@phonecoop.coop> >Date: Fri, 25 May 2012 12:20:36 +0100 >Subject: [PATCH] bug 8155 - comply with UK Electronic Commerce (EC Directive) Regulations 2002 > >C4/Auth.pm: destroy the session and cookie if it is not needed >installer/data/mysql/sysprefs.sql: change default for EnableOpacSearchHistory >koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref: add note about this law >koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt: add div#cookiewarning with consent request >--- > C4/Auth.pm | 17 +++++++++++++++++ > installer/data/mysql/sysprefs.sql | 2 +- > .../prog/en/modules/admin/preferences/opac.pref | 4 ++-- > koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt | 1 + > 4 files changed, 21 insertions(+), 3 deletions(-) > >diff --git a/C4/Auth.pm b/C4/Auth.pm >index ffee1bb..66ab5fa 100644 >--- a/C4/Auth.pm >+++ b/C4/Auth.pm >@@ -472,6 +472,23 @@ sub get_template_and_user { > ); > > $template->param(OpacPublic => '1') if ($user || C4::Context->preference("OpacPublic")); >+ >+ # bug 8155 - comply with UK Electronic Commerce (EC Directive) Regulations 2002 >+ # if we are not using any features requiring a session, destroy it and avoid sending the CGISESSID cookie to the browser >+ if ( >+ !( >+ $user >+ || C4::Context->preference('EnableOpacSearchHistory') >+ || C4::Context->preference('OpacBrowseResults') >+ ) >+ ) >+ { >+ my $session = get_session($sessionID); >+ $session->delete(); >+ $session->flush(); >+ $template->param( SessionID => undef ); >+ $cookie = undef; >+ } > } > return ( $template, $borrowernumber, $cookie, $flags); > } >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 49debd2..935e9e2 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -285,7 +285,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES > INSERT INTO systempreferences (variable,value,options,explanation,type)VALUES('DisplayOPACiconsXSLT', '1', '', 'If ON, displays the format, audience, type icons in XSLT MARC21 results and display pages.', 'YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowAllMessageDeletion','0','Allow any Library to delete any message','','YesNo'); > INSERT INTO systempreferences (variable,value,explanation,options,type)VALUES('ShowPatronImageInWebBasedSelfCheck', '0', 'If ON, displays patron image when a patron uses web-based self-checkout', '', 'YesNo'); >-INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('EnableOpacSearchHistory', '1', 'Enable or disable opac search history', 'YesNo',''); >+INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('EnableOpacSearchHistory', '0', 'Enable or disable opac search history', 'YesNo',''); > INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('RoutingListAddReserves','1','If ON the patrons on routing lists are automatically added to holds on the issue.','','YesNo'); > INSERT INTO `systempreferences` (variable,value,options,explanation,type) VALUES ( 'OpacAddMastheadLibraryPulldown', '0', '', 'Adds a pulldown menu to select the library to search on the opac masthead.', 'YesNo' ); > INSERT INTO systempreferences VALUES ('ImageLimit',5,'','Limit images stored in the database by the Patron Card image manager to this number.','Integer'); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >index eb74d81..da9ddbc 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref >@@ -257,7 +257,7 @@ OPAC: > choices: > yes: Allow > no: "Don't allow" >- - patrons to browse subject authorities on OPAC (run misc/cronjobs/build_browser_and_cloud.pl to create the browser list) >+ - patrons to browse subject authorities on OPAC (run misc/cronjobs/build_browser_and_cloud.pl to create the browser list) ("Allow" sets a cookie on every page, which may break UK/EU law in some situations.) > - > - pref: OpacAuthorities > choices: >@@ -436,7 +436,7 @@ OPAC: > choices: > yes: Keep > no: "Don't keep" >- - patron search history in the OPAC. >+ - patron search history in the OPAC. ("Keep" sets a cookie on every page, may break UK/EU law in some situations.) > - > - pref: OPACPrivacy > default: 0 >diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt b/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt >index a73c8bb..a329818 100644 >--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt >+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-auth.tt >@@ -84,6 +84,7 @@ please choose against which one you would like to authenticate: </p> > </ol></fieldset> > > <input type="submit" value="Log In" class="submit" /> >+<div id="cookiewarning"><p>Logging in here will save a small piece of information (a cookie) in your browser, to avoid sending your password on every page. For more information, see <a href="http://www.allaboutcookies.org/">AllAboutCookies.org</a>.</p></div> > <div id="nologininstructions"> <h5>Don't have a password yet?</h5><p> If you don't have a password yet, stop by the circulation desk the next time you're in the library. We'll happily set one up for you.</p> > <h5>Don't have a library card?</h5><p> If you don't have a library card, stop by your local library to sign up. </p></div> > </form> >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 8155
: 9775