From chrisc at catalyst.net.nz Tue Feb 1 04:39:52 2011
From: chrisc at catalyst.net.nz (Chris Cormack)
Date: Tue, 1 Feb 2011 16:39:52 +1300
Subject: [Koha-patches] [PATCH] Bug 5669: Adding a system preference to
control whether a user can select a pick branch for their
hold or not
Message-ID: <1296531592-9867-1-git-send-email-chrisc@catalyst.net.nz>
Default is on
Part of bug 5609
---
installer/data/mysql/de-DE/mandatory/sysprefs.sql | 1 +
installer/data/mysql/en/mandatory/sysprefs.sql | 1 +
.../1-Obligatoire/unimarc_standard_systemprefs.sql | 3 ++-
installer/data/mysql/it-IT/necessari/sysprefs.sql | 3 ++-
installer/data/mysql/pl-PL/mandatory/sysprefs.sql | 3 ++-
...m_preferences_full_optimal_for_install_only.sql | 3 ++-
...m_preferences_full_optimal_for_install_only.sql | 3 ++-
installer/data/mysql/updatedatabase.pl | 9 +++++++++
.../en/modules/admin/preferences/circulation.pref | 6 ++++++
.../opac-tmpl/prog/en/modules/opac-reserve.tmpl | 12 +++++++++---
kohaversion.pl | 2 +-
opac/opac-reserve.pl | 9 +++++++--
12 files changed, 44 insertions(+), 11 deletions(-)
diff --git a/installer/data/mysql/de-DE/mandatory/sysprefs.sql b/installer/data/mysql/de-DE/mandatory/sysprefs.sql
index 19f7c4d..8959ef6 100644
--- a/installer/data/mysql/de-DE/mandatory/sysprefs.sql
+++ b/installer/data/mysql/de-DE/mandatory/sysprefs.sql
@@ -283,3 +283,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
\ No newline at end of file
diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql
index b597b02..743288d 100644
--- a/installer/data/mysql/en/mandatory/sysprefs.sql
+++ b/installer/data/mysql/en/mandatory/sysprefs.sql
@@ -283,3 +283,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
\ No newline at end of file
diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
index b051ba3..2b2d697 100644
--- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
+++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
@@ -284,4 +284,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
-INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
\ No newline at end of file
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
\ No newline at end of file
diff --git a/installer/data/mysql/it-IT/necessari/sysprefs.sql b/installer/data/mysql/it-IT/necessari/sysprefs.sql
index 06f279d..8000636 100644
--- a/installer/data/mysql/it-IT/necessari/sysprefs.sql
+++ b/installer/data/mysql/it-IT/necessari/sysprefs.sql
@@ -268,4 +268,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
-INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
\ No newline at end of file
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
\ No newline at end of file
diff --git a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql
index c87729c..52bb566 100644
--- a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql
+++ b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql
@@ -281,4 +281,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
-INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
\ No newline at end of file
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
\ No newline at end of file
diff --git a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
index 993c6c3..d1e6b4d 100644
--- a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
+++ b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
@@ -336,4 +336,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
-INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
\ No newline at end of file
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
\ No newline at end of file
diff --git a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
index 3416b2e..b802145 100644
--- a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
+++ b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
@@ -362,4 +362,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
-INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
\ No newline at end of file
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
\ No newline at end of file
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index f03f48f..18ee48a 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -3970,6 +3970,15 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
+$DBversion = "3.03.00.XXX";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo')");
+ print "Upgrade to $DBversion done (Add syspref to control if user can choose pickup branch for holds)\n";
+ SetVersion ($DBversion);
+}
+
+
+
=head1 FUNCTIONS
=head2 DropAllForeignKeys($table)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
index 3742b23..489473b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
@@ -254,6 +254,12 @@ Circulation:
no: "Don't allow (with independent branches)"
- a user from one library to place a hold on an item from another library
-
+ - pref: OPACAllowUserToChooseBranch
+ choices:
+ yes: Allow
+ no: "Don't allow"
+ - a user to choose the branch to pick up a hold from.
+ -
- pref: ReservesNeedReturns
choices:
yes: "Don't automatically"
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl
index 61a7bea..970cfcd 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl
@@ -245,7 +245,9 @@
Place On
-
Pickup Location
+
+
Pickup Location
+
Title
@@ -412,7 +414,9 @@
-
+
+
+
-
+
+
+
diff --git a/kohaversion.pl b/kohaversion.pl
index f57080e..8330459 100644
--- a/kohaversion.pl
+++ b/kohaversion.pl
@@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts :
use strict;
sub kohaversion {
- our $VERSION = '3.03.00.015';
+ our $VERSION = '3.03.00.XXX';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install
diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl
index fca1e0b..865a7c4 100755
--- a/opac/opac-reserve.pl
+++ b/opac/opac-reserve.pl
@@ -88,7 +88,7 @@ if (($#biblionumbers < 0) && (! $query->param('place_reserve'))) {
}
# pass the pickup branch along....
-my $branch = $query->param('branch') || C4::Context->userenv->{branch} || '' ;
+my $branch = $query->param('branch') || $borr->{'branchcode'} || C4::Context->userenv->{branch} || '' ;
($branches->{$branch}) or $branch = ""; # Confirm branch is real
$template->param( branch => $branch );
@@ -96,6 +96,11 @@ $template->param( branch => $branch );
my $CGIbranchloop = GetBranchesLoop($branch);
$template->param( CGIbranch => $CGIbranchloop );
+# Is the person allowed to choose their branch
+my $OPACChooseBranch = (C4::Context->preference("OPACAllowUserToChooseBranch")) ? 1 : 0;
+
+$template->param( choose_branch => $OPACChooseBranch);
+
#
#
# Build hashes of the requested biblio(item)s and items.
@@ -175,7 +180,7 @@ if ( $query->param('place_reserve') ) {
my $branch = shift(@selectedItems); # i.e., branch code, not name
my $singleBranchMode = $template->param('singleBranchMode');
- if ($singleBranchMode) {
+ if ($singleBranchMode || ! $OPACChooseBranch) { # single branch mode or disabled user choosing
$branch = $borr->{'branchcode'};
}
--
1.7.1
From f.demians at tamil.fr Tue Feb 1 08:42:59 2011
From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=)
Date: Tue, 1 Feb 2011 08:42:59 +0100
Subject: [Koha-patches] [PATCH] Bug 3977 Follow up. Suppress unnecessary
table update
Message-ID: <1296546179-2895-1-git-send-email-f.demians@tamil.fr>
updatabase.pl try for v. 3.03.00.016 to add a new column 'privacy' to borrowers
table, but this column already exists: introduced by 3.01.00.072 version.
---
installer/data/mysql/updatedatabase.pl | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index d91b295..1d24d66 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -3974,7 +3974,6 @@ $DBversion = '3.03.00.016';
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
# reimplement OpacPrivacy system preference
$dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPrivacy', '0', 'if ON, allows patrons to define their privacy rules (reading history)',NULL,'YesNo')");
- $dbh->do("ALTER TABLE `borrowers` ADD `privacy` INTEGER NOT NULL DEFAULT 1;");
$dbh->do("ALTER TABLE `deletedborrowers` ADD `privacy` INTEGER NOT NULL DEFAULT 1;");
print "Upgrade to $DBversion done (OpacPrivacy reimplementation)\n";
SetVersion($DBversion);
--
1.7.3.5
From f.demians at tamil.fr Tue Feb 1 09:11:47 2011
From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=)
Date: Tue, 1 Feb 2011 09:11:47 +0100
Subject: [Koha-patches] [PATCH] Bug 5431: Separate state field for library
addresses
Message-ID: <1296547907-9160-1-git-send-email-f.demians@tamil.fr>
From: Katrin Fischer
[SIGNED-OFF] Go with coming bug 5422 in order to have harmonized city/state
handling for branches and borrowers.
Signed-off-by: Fr?d?ric Demians
---
C4/Branch.pm | 10 ++++++----
admin/branches.pl | 3 ++-
installer/data/mysql/kohastructure.sql | 1 +
installer/data/mysql/updatedatabase.pl | 7 +++++++
.../prog/en/modules/admin/branches.tmpl | 6 ++++--
kohaversion.pl | 2 +-
6 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/C4/Branch.pm b/C4/Branch.pm
index 1f26e35..817aa38 100644
--- a/C4/Branch.pm
+++ b/C4/Branch.pm
@@ -203,7 +203,7 @@ sub ModBranch {
my $query = "
INSERT INTO branches
(branchcode,branchname,branchaddress1,
- branchaddress2,branchaddress3,branchzip,branchcity,
+ branchaddress2,branchaddress3,branchzip,branchcity,branchstate,
branchcountry,branchphone,branchfax,branchemail,
branchurl,branchip,branchprinter,branchnotes)
VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
@@ -213,7 +213,8 @@ sub ModBranch {
$data->{'branchcode'}, $data->{'branchname'},
$data->{'branchaddress1'}, $data->{'branchaddress2'},
$data->{'branchaddress3'}, $data->{'branchzip'},
- $data->{'branchcity'}, $data->{'branchcountry'},
+ $data->{'branchcity'}, $data->{'branchstate'},
+ $data->{'branchcountry'},
$data->{'branchphone'}, $data->{'branchfax'},
$data->{'branchemail'}, $data->{'branchurl'},
$data->{'branchip'}, $data->{'branchprinter'},
@@ -225,7 +226,7 @@ sub ModBranch {
UPDATE branches
SET branchname=?,branchaddress1=?,
branchaddress2=?,branchaddress3=?,branchzip=?,
- branchcity=?,branchcountry=?,branchphone=?,
+ branchcity=?,branchstate=?,branchcountry=?,branchphone=?,
branchfax=?,branchemail=?,branchurl=?,branchip=?,
branchprinter=?,branchnotes=?
WHERE branchcode=?
@@ -235,7 +236,8 @@ sub ModBranch {
$data->{'branchname'},
$data->{'branchaddress1'}, $data->{'branchaddress2'},
$data->{'branchaddress3'}, $data->{'branchzip'},
- $data->{'branchcity'}, $data->{'branchcountry'},
+ $data->{'branchcity'}, $data->{'branchstate'},
+ $data->{'branchcountry'},
$data->{'branchphone'}, $data->{'branchfax'},
$data->{'branchemail'}, $data->{'branchurl'},
$data->{'branchip'}, $data->{'branchprinter'},
diff --git a/admin/branches.pl b/admin/branches.pl
index 758fa32..b83fb67 100755
--- a/admin/branches.pl
+++ b/admin/branches.pl
@@ -343,7 +343,7 @@ sub branchinfotable {
for my $field (
'branchaddress1', 'branchaddress2',
'branchaddress3', 'branchzip',
- 'branchcity', 'branchcountry',
+ 'branchcity', 'branchstate', 'branchcountry',
'branchphone', 'branchfax',
'branchemail', 'branchurl',
'branchip', 'branchprinter', 'branchnotes'
@@ -402,6 +402,7 @@ sub _branch_to_template {
branchaddress3 => $data->{'branchaddress3'},
branchzip => $data->{'branchzip'},
branchcity => $data->{'branchcity'},
+ branchstate => $data->{'branchstate'},
branchcountry => $data->{'branchcountry'},
branchphone => $data->{'branchphone'},
branchfax => $data->{'branchfax'},
diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql
index e7ad97f..4ea52cf 100644
--- a/installer/data/mysql/kohastructure.sql
+++ b/installer/data/mysql/kohastructure.sql
@@ -342,6 +342,7 @@ CREATE TABLE `branches` (
`branchaddress3` mediumtext,
`branchzip` varchar(25) default NULL,
`branchcity` mediumtext,
+ `branchstate` mediumtext,
`branchcountry` text,
`branchphone` mediumtext,
`branchfax` mediumtext,
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index 4618636..c8e2bdb 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -3987,6 +3987,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
+$DBversion = '3.0X.XX.XXX';
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("ALTER TABLE branches ADD `branchstate` mediumtext AFTER `branchcity`;");
+ print "Upgrade to $DBversion done (Add state to branch address)\n";
+ SetVersion ($DBversion);
+}
+
=head1 FUNCTIONS
=head2 DropAllForeignKeys($table)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl
index 14da769..95ca011 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/branches.tmpl
@@ -109,7 +109,8 @@
" />
" />
" />
-
" />
+
" />
+
" />
" />
" />
" />
@@ -211,7 +212,8 @@
-
+ ,
+
diff --git a/kohaversion.pl b/kohaversion.pl
index e15f01b..3ece202 100644
--- a/kohaversion.pl
+++ b/kohaversion.pl
@@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts :
use strict;
sub kohaversion {
- our $VERSION = '3.03.00.017';
+ our $VERSION = '3.0X.XX.XXX';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install
--
1.7.3.5
From f.demians at tamil.fr Tue Feb 1 09:55:17 2011
From: f.demians at tamil.fr (=?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Demians?=)
Date: Tue, 1 Feb 2011 09:55:17 +0100
Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 5669: Adding a system
preference to control whether a user can select a pick branch
for their hold or not
Message-ID: <1296550517-19145-1-git-send-email-f.demians@tamil.fr>
From: Chris Cormack
Default is on
Part of bug 5609
Signed-off-by: Fr?d?ric Demians
---
installer/data/mysql/de-DE/mandatory/sysprefs.sql | 1 +
installer/data/mysql/en/mandatory/sysprefs.sql | 1 +
.../1-Obligatoire/unimarc_standard_systemprefs.sql | 3 ++-
installer/data/mysql/it-IT/necessari/sysprefs.sql | 3 ++-
installer/data/mysql/pl-PL/mandatory/sysprefs.sql | 3 ++-
...m_preferences_full_optimal_for_install_only.sql | 3 ++-
...m_preferences_full_optimal_for_install_only.sql | 3 ++-
installer/data/mysql/updatedatabase.pl | 7 +++++++
.../en/modules/admin/preferences/circulation.pref | 6 ++++++
.../opac-tmpl/prog/en/modules/opac-reserve.tmpl | 12 +++++++++---
kohaversion.pl | 2 +-
opac/opac-reserve.pl | 9 +++++++--
12 files changed, 42 insertions(+), 11 deletions(-)
diff --git a/installer/data/mysql/de-DE/mandatory/sysprefs.sql b/installer/data/mysql/de-DE/mandatory/sysprefs.sql
index 02511d8..4ff7831 100644
--- a/installer/data/mysql/de-DE/mandatory/sysprefs.sql
+++ b/installer/data/mysql/de-DE/mandatory/sysprefs.sql
@@ -285,3 +285,4 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql b/installer/data/mysql/en/mandatory/sysprefs.sql
index 0b75e98..6e4913f 100644
--- a/installer/data/mysql/en/mandatory/sysprefs.sql
+++ b/installer/data/mysql/en/mandatory/sysprefs.sql
@@ -285,3 +285,4 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
diff --git a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
index 757f255..bd01da0 100644
--- a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
+++ b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
@@ -286,4 +286,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
-INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
\ No newline at end of file
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
diff --git a/installer/data/mysql/it-IT/necessari/sysprefs.sql b/installer/data/mysql/it-IT/necessari/sysprefs.sql
index 79c469c..b23bc34 100644
--- a/installer/data/mysql/it-IT/necessari/sysprefs.sql
+++ b/installer/data/mysql/it-IT/necessari/sysprefs.sql
@@ -271,4 +271,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
-INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
\ No newline at end of file
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
diff --git a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql
index 8689c4c..a820391 100644
--- a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql
+++ b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql
@@ -283,4 +283,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
-INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
\ No newline at end of file
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
diff --git a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
index c862e60..07a0b94 100644
--- a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
+++ b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
@@ -338,4 +338,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
-INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
\ No newline at end of file
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
diff --git a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
index 82e285b..d5f6c7e 100644
--- a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
+++ b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
@@ -363,4 +363,5 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
-INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
\ No newline at end of file
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
+INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo');
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index 4618636..a7ddcec 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -3987,6 +3987,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
+$DBversion = "3.03.00.XXX";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('OPACAllowUserToChooseBranch', 1, 'Allow the user to choose the branch they want to pickup their hold from','1','YesNo')");
+ print "Upgrade to $DBversion done (Add syspref to control if user can choose pickup branch for holds)\n";
+ SetVersion ($DBversion);
+
+
=head1 FUNCTIONS
=head2 DropAllForeignKeys($table)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
index 3742b23..489473b 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref
@@ -254,6 +254,12 @@ Circulation:
no: "Don't allow (with independent branches)"
- a user from one library to place a hold on an item from another library
-
+ - pref: OPACAllowUserToChooseBranch
+ choices:
+ yes: Allow
+ no: "Don't allow"
+ - a user to choose the branch to pick up a hold from.
+ -
- pref: ReservesNeedReturns
choices:
yes: "Don't automatically"
diff --git a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl
index 61a7bea..970cfcd 100644
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl
+++ b/koha-tmpl/opac-tmpl/prog/en/modules/opac-reserve.tmpl
@@ -245,7 +245,9 @@
Place On
-
Pickup Location
+
+
Pickup Location
+
Title
@@ -412,7 +414,9 @@
-
+
+
+
-
+
+
+
diff --git a/kohaversion.pl b/kohaversion.pl
index e15f01b..8330459 100644
--- a/kohaversion.pl
+++ b/kohaversion.pl
@@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts :
use strict;
sub kohaversion {
- our $VERSION = '3.03.00.017';
+ our $VERSION = '3.03.00.XXX';
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install
diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl
index fca1e0b..865a7c4 100755
--- a/opac/opac-reserve.pl
+++ b/opac/opac-reserve.pl
@@ -88,7 +88,7 @@ if (($#biblionumbers < 0) && (! $query->param('place_reserve'))) {
}
# pass the pickup branch along....
-my $branch = $query->param('branch') || C4::Context->userenv->{branch} || '' ;
+my $branch = $query->param('branch') || $borr->{'branchcode'} || C4::Context->userenv->{branch} || '' ;
($branches->{$branch}) or $branch = ""; # Confirm branch is real
$template->param( branch => $branch );
@@ -96,6 +96,11 @@ $template->param( branch => $branch );
my $CGIbranchloop = GetBranchesLoop($branch);
$template->param( CGIbranch => $CGIbranchloop );
+# Is the person allowed to choose their branch
+my $OPACChooseBranch = (C4::Context->preference("OPACAllowUserToChooseBranch")) ? 1 : 0;
+
+$template->param( choose_branch => $OPACChooseBranch);
+
#
#
# Build hashes of the requested biblio(item)s and items.
@@ -175,7 +180,7 @@ if ( $query->param('place_reserve') ) {
my $branch = shift(@selectedItems); # i.e., branch code, not name
my $singleBranchMode = $template->param('singleBranchMode');
- if ($singleBranchMode) {
+ if ($singleBranchMode || ! $OPACChooseBranch) { # single branch mode or disabled user choosing
$branch = $borr->{'branchcode'};
}
--
1.7.3.5
From cnighswonger at foundations.edu Tue Feb 1 20:48:50 2011
From: cnighswonger at foundations.edu (Chris Nighswonger)
Date: Tue, 1 Feb 2011 14:48:50 -0500
Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 3881: OPAC Privacy
reimplementation
In-Reply-To: <1296366516-3342-1-git-send-email-nengard@bywatersolutions.com>
References: <1296366516-3342-1-git-send-email-nengard@bywatersolutions.com>
Message-ID:
This patch does not apply cleanly to 3.2.x. Please fixup and resubmit with
[3.2.x] in the subject line.
Kind Regards,
Chris
cnighs at li24-93:~/koha.3.2.test (3.2.x *+)$ git status
# On branch 3.2.x
# Changes to be committed:
# (use "git reset HEAD ..." to unstage)
#
# modified: C4/Auth.pm
# modified: C4/Circulation.pm
# modified: C4/Members.pm
# modified: installer/data/mysql/de-DE/mandatory/sysprefs.sql
# modified: installer/data/mysql/en/mandatory/sysprefs.sql
# modified:
installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
# modified: installer/data/mysql/it-IT/necessari/sysprefs.sql
# modified: installer/data/mysql/pl-PL/mandatory/sysprefs.sql
# modified:
installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
# modified:
installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
# modified: installer/data/mysql/updatedatabase.pl
# modified:
koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
# modified: koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc
# new file: koha-tmpl/opac-tmpl/prog/en/modules/opac-privacy.tmpl
# modified: members/moremember.pl
# new file: opac/opac-privacy.pl
# modified: opac/opac-suggestions.pl
#
# Unmerged paths:
# (use "git reset HEAD ..." to unstage)
# (use "git add/rm ..." as appropriate to mark resolution)
#
# both modified:
koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref
#
On Sun, Jan 30, 2011 at 12:48 AM, Nicole Engard <
nengard at bywatersolutions.com> wrote:
> From: Ian Walls
>
> Reimplements Paul Poulain's original OPAC Privacy patch, with some minor
> improvements and changes to wording
>
> If the library enables the OPACPrivacy system preference along with the
> opacreadinghistory preference, and sets
> an AnonymousPatron (must be a valid patron number in the database), the
> user will see a new tab upon login to
> the OPAC, My Privacy. From there, the user can:
>
> - Set their OPAC Privacy to one of three values
> 0 - Forever. This keeps their reading history unless they explicitly
> delete it; the bulk anonymiser won't touch it
> 1 - Default. Keep reading history until either they delete it or the
> library does
> 2 - Never. Instantly anonymises reading history upon item return
>
> - Instantly delete their reading history
> There is a warning and a popup to confirm. I've removed Paul's extra
> confirm checkbox, which seemed redundant
>
> A note of which preference the patron has selected is added to the Patorn
> Details page in the staff client. This is read-only.
>
> This patch also consolidates Privacy system preferences into the Privacy
> section of the OPAC tab.
>
> Thank you to BibLibre for the original implmentation of this patch, and Los
> Gatos Public Library for funding and
> testing the reimplementation.
>
> Signed-off-by: Nicole Engard
> ---
> C4/Auth.pm | 1 +
> C4/Circulation.pm | 44 ++++++++++--
> C4/Members.pm | 26 +++++++
> installer/data/mysql/de-DE/mandatory/sysprefs.sql | 4 +-
> installer/data/mysql/en/mandatory/sysprefs.sql | 4 +-
> .../1-Obligatoire/unimarc_standard_systemprefs.sql | 4 +-
> installer/data/mysql/it-IT/necessari/sysprefs.sql | 9 ++-
> installer/data/mysql/pl-PL/mandatory/sysprefs.sql | 4 +-
> ...m_preferences_full_optimal_for_install_only.sql | 4 +-
> ...m_preferences_full_optimal_for_install_only.sql | 5 +-
> installer/data/mysql/updatedatabase.pl | 10 +++
> .../prog/en/modules/admin/preferences/opac.pref | 37 +++++++---
> .../prog/en/modules/members/moremember.tmpl | 5 ++
> koha-tmpl/opac-tmpl/prog/en/includes/usermenu.inc | 3 +
> .../opac-tmpl/prog/en/modules/opac-privacy.tmpl | 72
> ++++++++++++++++++++
> members/moremember.pl | 6 ++
> opac/opac-privacy.pl | 68
> ++++++++++++++++++
> opac/opac-suggestions.pl | 2 +-
> 18 files changed, 279 insertions(+), 29 deletions(-)
> create mode 100644 koha-tmpl/opac-tmpl/prog/en/modules/opac-privacy.tmpl
> create mode 100755 opac/opac-privacy.pl
>
> diff --git a/C4/Auth.pm b/C4/Auth.pm
> index fc4e3e2..130974e 100644
> --- a/C4/Auth.pm
> +++ b/C4/Auth.pm
> @@ -418,6 +418,7 @@ sub get_template_and_user {
> OpacNav => "" .
> C4::Context->preference("OpacNav"),
> OpacPasswordChange =>
> C4::Context->preference("OpacPasswordChange"),
> OPACPatronDetails =>
> C4::Context->preference("OPACPatronDetails"),
> + OPACPrivacy =>
> C4::Context->preference("OPACPrivacy"),
> OPACFinesTab =>
> C4::Context->preference("OPACFinesTab"),
> OpacTopissue =>
> C4::Context->preference("OpacTopissue"),
> RequestOnOpac =>
> C4::Context->preference("RequestOnOpac"),
> diff --git a/C4/Circulation.pm b/C4/Circulation.pm
> index b741794..f7846ac 100644
> --- a/C4/Circulation.pm
> +++ b/C4/Circulation.pm
> @@ -1516,7 +1516,7 @@ sub AddReturn {
> }
>
> if ($borrowernumber) {
> - MarkIssueReturned($borrowernumber, $item->{'itemnumber'},
> $circControlBranch);
> + MarkIssueReturned($borrowernumber, $item->{'itemnumber'},
> $circControlBranch, '', $borrower->{'privacy'});
> $messages->{'WasReturned'} = 1; # FIXME is the "= 1" right?
> This could be the borrower hash.
> }
>
> @@ -1621,7 +1621,7 @@ sub AddReturn {
>
> =head2 MarkIssueReturned
>
> - MarkIssueReturned($borrowernumber, $itemnumber, $dropbox_branch,
> $returndate);
> + MarkIssueReturned($borrowernumber, $itemnumber, $dropbox_branch,
> $returndate, $privacy);
>
> Unconditionally marks an issue as being returned by
> moving the C row to C and
> @@ -1633,6 +1633,9 @@ it's safe to do this, i.e. last non-holiday >
> issuedate.
> if C<$returndate> is specified (in iso format), it is used as the date
> of the return. It is ignored when a dropbox_branch is passed in.
>
> +C<$privacy> contains the privacy parameter. If the patron has set privacy
> to 2,
> +the old_issue is immediately anonymised
> +
> Ideally, this function would be internal to C,
> not exported, but it is currently needed by one
> routine in C.
> @@ -1640,7 +1643,7 @@ routine in C.
> =cut
>
> sub MarkIssueReturned {
> - my ( $borrowernumber, $itemnumber, $dropbox_branch, $returndate ) =
> @_;
> + my ( $borrowernumber, $itemnumber, $dropbox_branch, $returndate,
> $privacy ) = @_;
> my $dbh = C4::Context->dbh;
> my $query = "UPDATE issues SET returndate=";
> my @bind;
> @@ -1664,6 +1667,16 @@ sub MarkIssueReturned {
> WHERE borrowernumber = ?
> AND itemnumber = ?");
> $sth_copy->execute($borrowernumber, $itemnumber);
> + # anonymise patron checkout immediately if $privacy set to 2 and
> AnonymousPatron is set to a valid borrowernumber
> + if ( $privacy == 2) {
> + # The default of 0 does not work due to foreign key constraints
> + # The anonymisation will fail quietly if AnonymousPatron is not a
> valid entry
> + my $anonymouspatron = (C4::Context->preference('AnonymousPatron'))
> ? C4::Context->preference('AnonymousPatron') : 0;
> + my $sth_ano = $dbh->prepare("UPDATE old_issues SET
> borrowernumber=?
> + WHERE borrowernumber = ?
> + AND itemnumber = ?");
> + $sth_ano->execute($anonymouspatron, $borrowernumber, $itemnumber);
> + }
> my $sth_del = $dbh->prepare("DELETE FROM issues
> WHERE borrowernumber = ?
> AND itemnumber = ?");
> @@ -2417,11 +2430,14 @@ sub DeleteTransfer {
>
> =head2 AnonymiseIssueHistory
>
> - $rows = AnonymiseIssueHistory($borrowernumber,$date)
> + $rows = AnonymiseIssueHistory($date,$borrowernumber)
>
> This function write NULL instead of C<$borrowernumber> given on input arg
> into the table issues.
> if C<$borrowernumber> is not set, it will delete the issue history for all
> borrower older than C<$date>.
>
> +If c<$borrowernumber> is set, it will delete issue history for only that
> borrower, regardless of their opac privacy
> +setting (force delete).
> +
> return the number of affected rows.
>
> =cut
> @@ -2432,12 +2448,24 @@ sub AnonymiseIssueHistory {
> my $dbh = C4::Context->dbh;
> my $query = "
> UPDATE old_issues
> - SET borrowernumber = NULL
> - WHERE returndate < '".$date."'
> + SET borrowernumber = ?
> + WHERE returndate < ?
> AND borrowernumber IS NOT NULL
> ";
> - $query .= " AND borrowernumber = '".$borrowernumber."'" if defined
> $borrowernumber;
> - my $rows_affected = $dbh->do($query);
> +
> + # The default of 0 does not work due to foreign key constraints
> + # The anonymisation will fail quietly if AnonymousPatron is not a
> valid entry
> + my $anonymouspatron = (C4::Context->preference('AnonymousPatron')) ?
> C4::Context->preference('AnonymousPatron') : 0;
> + my @bind_params = ($anonymouspatron, $date);
> + if (defined $borrowernumber) {
> + $query .= " AND borrowernumber = ?";
> + push @bind_params, $borrowernumber;
> + } else {
> + $query .= " AND (SELECT privacy FROM borrowers WHERE
> borrowers.borrowernumber=old_issues.borrowernumber) <> 0";
> + }
> + my $sth = $dbh->prepare($query);
> + $sth->execute(@bind_params);
> + my $rows_affected = $sth->rows; ### doublecheck row count return
> function
> return $rows_affected;
> }
>
> diff --git a/C4/Members.pm b/C4/Members.pm
> index 00716cd..fafc99b 100644
> --- a/C4/Members.pm
> +++ b/C4/Members.pm
> @@ -93,6 +93,7 @@ BEGIN {
> push @EXPORT, qw(
> &ModMember
> &changepassword
> + &ModPrivacy
> );
>
> #Delete data
> @@ -2022,6 +2023,31 @@ sub DebarMember {
>
> }
>
> +=head2 ModPrivacy
> +
> +=over 4
> +
> +my $success = ModPrivacy( $borrowernumber, $privacy );
> +
> +Update the privacy of a patron.
> +
> +return :
> +true on success, false on failure
> +
> +=back
> +
> +=cut
> +
> +sub ModPrivacy {
> + my $borrowernumber = shift;
> + my $privacy = shift;
> + return unless defined $borrowernumber;
> + return unless $borrowernumber =~ /^\d+$/;
> +
> + return ModMember( borrowernumber => $borrowernumber,
> + privacy => $privacy );
> +}
> +
> =head2 AddMessage
>
> AddMessage( $borrowernumber, $message_type, $message, $branchcode );
> diff --git a/installer/data/mysql/de-DE/mandatory/sysprefs.sql
> b/installer/data/mysql/de-DE/mandatory/sysprefs.sql
> index 19f7c4d..02511d8 100644
> --- a/installer/data/mysql/de-DE/mandatory/sysprefs.sql
> +++ b/installer/data/mysql/de-DE/mandatory/sysprefs.sql
> @@ -9,7 +9,8 @@ INSERT INTO `systempreferences`
> (variable,value,explanation,options,type) VALUES
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AmazonLocale','US','Use to set the Locale of your Amazon.com Web
> Services','US|CA|DE|FR|JP|UK','Choice');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AWSAccessKeyID','','See: http://aws.amazon.com','','free');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AmazonAssocTag','','See: http://aws.amazon.com','','free');
> -INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonSuggestions',0,'Set to anonymous borrowernumber to enable
> Anonymous suggestions',NULL,'free');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonSuggestions',0,'Set to enable Anonymous suggestions to
> AnonymousPatron borrowernumber',NULL,'YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonymousPatron', '0', 'Set the identifier (borrowernumber) of the
> anonymous patron. Used for Suggestion and reading history privacy',NULL,'');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('Babeltheque',0,'Turn ON Babeltheque content - See babeltheque.comto subscribe to this service','','YesNo');
>
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('authoritysep','--','Used to separate a list of authorities in a
> display. Usually --',10,'free');
> @@ -79,6 +80,7 @@ INSERT INTO `systempreferences`
> (variable,value,explanation,options,type) VALUES
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacNav','Important links here.','Use HTML tags to add navigational
> links to the left-hand navigational bar in OPAC','70|10','Textarea');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OPACNoResultsFound','','Display this HTML when no results are found
> for a search in the OPAC','70|10','Textarea');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacPasswordChange',1,'If ON, enables patron-initiated password
> change in OPAC (disable it when using LDAP auth)',NULL,'YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacPrivacy', '0', 'if ON, allows patrons to define their privacy
> rules (reading history)',NULL,'YesNo');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacreadinghistory',1,'If ON, enables display of Patron Circulation
> History in OPAC','','YesNo');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacsmallimage','','Enter a complete URL to an image to replace the
> default Koha logo','','free');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacstylesheet','','Enter a complete URL to use an alternate layout
> stylesheet in OPAC','','free');
> diff --git a/installer/data/mysql/en/mandatory/sysprefs.sql
> b/installer/data/mysql/en/mandatory/sysprefs.sql
> index b597b02..0b75e98 100644
> --- a/installer/data/mysql/en/mandatory/sysprefs.sql
> +++ b/installer/data/mysql/en/mandatory/sysprefs.sql
> @@ -9,7 +9,8 @@ INSERT INTO `systempreferences`
> (variable,value,explanation,options,type) VALUES
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AmazonLocale','US','Use to set the Locale of your Amazon.com Web
> Services','US|CA|DE|FR|JP|UK','Choice');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AWSAccessKeyID','','See: http://aws.amazon.com','','free');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AmazonAssocTag','','See: http://aws.amazon.com','','free');
> -INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonSuggestions',0,'Set to anonymous borrowernumber to enable
> Anonymous suggestions',NULL,'free');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonSuggestions',0,'Set to enable Anonymous suggestions to
> AnonymousPatron borrowernumber',NULL,'YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonymousPatron', '0', 'Set the identifier (borrowernumber) of the
> anonymous patron. Used for Suggestion and reading history privacy',NULL,'');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('Babeltheque',0,'Turn ON Babeltheque content - See babeltheque.comto subscribe to this service','','YesNo');
>
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('authoritysep','--','Used to separate a list of authorities in a
> display. Usually --',10,'free');
> @@ -79,6 +80,7 @@ INSERT INTO `systempreferences`
> (variable,value,explanation,options,type) VALUES
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacNav','Important links here.','Use HTML tags to add navigational
> links to the left-hand navigational bar in OPAC','70|10','Textarea');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OPACNoResultsFound','','Display this HTML when no results are found
> for a search in the OPAC','70|10','Textarea');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacPasswordChange',1,'If ON, enables patron-initiated password
> change in OPAC (disable it when using LDAP auth)',NULL,'YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacPrivacy', '0', 'if ON, allows patrons to define their privacy
> rules (reading history)',NULL,'YesNo');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacreadinghistory',1,'If ON, enables display of Patron Circulation
> History in OPAC','','YesNo');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacsmallimage','','Enter a complete URL to an image to replace the
> default Koha logo','','free');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacstylesheet','','Enter a complete URL to use an alternate layout
> stylesheet in OPAC','','free');
> diff --git
> a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
> b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
> index b051ba3..757f255 100644
> ---
> a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
> +++
> b/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql
> @@ -10,7 +10,8 @@ INSERT INTO `systempreferences`
> (variable,value,explanation,options,type) VALUES
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AmazonLocale','US','Utilis? pour d?finir la localisation des web
> services Amazon','US|CA|DE|FR|JP|UK','Choice');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AWSAccessKeyID','','Voir : http://aws.amazon.com','','free');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AmazonAssocTag', '', 'Voir :
> associates.amazon.com/gp/flex/associates/apply-login.html', '', '');
> -INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonSuggestions', '0', 'Attribu?e au n? de l''emprunteur anonyme
> pour activer les suggestions anonymes. 0, pas de suggestions anonymes.', '',
> 'free');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonSuggestions',0,'Set to enable Anonymous suggestions to
> AnonymousPatron borrowernumber',NULL,'YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonymousPatron', '0', 'Set the identifier (borrowernumber) of the
> anonymous patron. Used for Suggestion and reading history privacy',NULL,'');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('Babeltheque',0,'Active les contenus Babelth?que - Voir
> babeltheque.com pour s''abonner','','YesNo');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('authoritysep', '--', 'Le s?parateur utilis? dans les autorit?s.
> Habituellement --', '10', 'free');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('autoBarcode', 'OFF', 'Utilis? pour g?n?rer automatiquement les codes
> barre: incremental sera de la forme 1, 2, 3; annual de la forme 2007-0001,
> 2007-0002, hbyymmincr de la forme HB09010001 o? HB=la branche
> d''appartenance', 'incremental|annual|hbyymmincr|OFF', 'Choice');
> @@ -91,6 +92,7 @@ INSERT INTO `systempreferences`
> (variable,value,explanation,options,type) VALUES
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacMainUserBlock','Bienvenue dans Koha...\r\n','Bloc HTML
> d?fini par la biblioth?que, qui appara?t sur la page principale de
> l''OPAC','70|10','Textarea');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacNav', '', 'Ce param?tre contient du code HTML, qui est mis au
> d?but de la barre de navigation, sur la gauche, ? l''OPAC.','70|10',
> 'Textarea');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacPasswordChange', '1', 'Si ce param?tre est activ?, les adh?rents
> peuvent modifier leur mot de passe ? l''OPAC. A d?sactiver si vous utilisez
> l''authentification ldap', '', 'YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacPrivacy', '0', 'if ON, allows patrons to define their privacy
> rules (reading history)',NULL,'YesNo');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacreadinghistory', '1', 'Si ce param?tre est activ?, les adh?rents
> peuvent consulter leur historique de lecture ? l''OPAC', '', 'YesNo');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacsmallimage', '', 'Ce param?tre contient une URL. Il permet de
> d?finir l''image qui est affich?e en haut, ? gauche de l''OPAC', '',
> 'free');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacstylesheet', '', 'Ce param?tre a la forme d''une URL. Il d?finit
> la feuille de style utilis?e ? l''OPAC. S''il est vide, vous aurez la
> feuille de style par d?fault de Koha', '', 'free');
> diff --git a/installer/data/mysql/it-IT/necessari/sysprefs.sql
> b/installer/data/mysql/it-IT/necessari/sysprefs.sql
> index 06f279d..cc00e68 100644
> --- a/installer/data/mysql/it-IT/necessari/sysprefs.sql
> +++ b/installer/data/mysql/it-IT/necessari/sysprefs.sql
> @@ -9,6 +9,7 @@ insert into `systempreferences` (`variable`, `value`,
> `options`, `explanation`,
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('advancedMARCeditor','0','','Se su ON, nel
> MARC editor non verranno visualizzati i campi/sottocampi delle
> descrizioni.','YesNo');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`)
> values('AdvancedSearchTypes','itemtypes','itemtypes|ccode','Selezionare
> quale set di campi comprender? la ricerca avanzata per tipo.','Choice');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('AllowHoldsOnDamagedItems','1','','Permette
> l\'inserimento di richieste di prenotazione su copie danneggiate','YesNo');
> +insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('AllowNotForLoanOverride','0','','Se ON,
> abilita il bibliotecario a poter scegliere di dare in prestito un documento
> normalmente escluso.','YesNo');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('AllowOnShelfHolds','1','','Permette di
> inserire prenotazioni su documenti non in prestito.','YesNo');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('AllowRenewalLimitOverride','1','','Se On,
> permette che i limiti ai rinnovi possano essere superati dal bibliotecario
> nel modulo della circolazione','YesNo');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('AmazonAssocTag','','','See:
> http://aws.amazon.com','free');
> @@ -17,7 +18,9 @@ insert into `systempreferences` (`variable`, `value`,
> `options`, `explanation`,
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('AmazonLocale','US','US|CA|DE|FR|JP|UK','Usalo
> per definire il tuo specifico Amazon.com Web Services','Choice');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('AmazonReviews','0','','Visualizza Amazon
> reviews sull\'interfaccia dello staff.','YesNo');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('AmazonSimilarItems','0','','Messa su ON
> attiva l\' Amazon Similar Items feature - Devi settare i valori in
> AWSAccessKeyID e in AmazonAssocTag per usarla','YesNo');
> -insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('AnonSuggestions','0','','Imposta un utente
> anonimo per abilitare i suggerimenti d\'acquisto da utenti non
> registrati.','free');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonSuggestions',0,'Set to enable Anonymous suggestions to
> AnonymousPatron borrowernumber',NULL,'YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonymousPatron', '0', 'Set the identifier (borrowernumber) of the
> anonymous patron. Used for Suggestion and reading history privacy',NULL,'');
> +insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('AuthDisplayHierarchy','0','','Se ON attiva la
> gestione gerarchica dell\'authority. Da usare solo con thesaurus','YesNo');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('authoritysep','--','10','Carattere usato
> nella visualizzazione come separatore della lista delle authority.
> Normalmente ? --','free');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`)
> values('autoBarcode','annual','incremental|annual|hbyymmincr|OFF','Da usare
> per impostare la generazione automatica dei barcode: incremental per la
> tipologia 1, 2, 3; annuale per 2007-0001, 2007-0002; hbyymmincr per
> HB08010001 dove HB sta per Home Branch (sottobiblioteca
> predefinita)','Choice');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('AutoEmailOpacUser','0','','Quando viene
> creato un account, invia notifica via email all\'utente con i dettagli del
> nuovo account.','YesNo');
> @@ -89,10 +92,12 @@ insert into `systempreferences` (`variable`, `value`,
> `options`, `explanation`,
> -- insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`)
> values('marcflavour','UNIMARC','MARC21|UNIMARC','Define global MARC flavor
> (MARC21 or UNIMARC) used for character encoding','Choice');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('MARCOrgCode','0','','Il MARC Organization
> Code - http://www.loc.gov/marc/organizations/orgshome.html','free');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('MaxFine','9999','','Multa massima che un
> utente potrebbe avere per un singolo ritardo.','Integer');
> +insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('maxItemsInSearchResults','20','','Specifica
> il numero massimo di copie visualizzate nelle pagine di risultati','free');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('maxoutstanding','5','','Definisci il numero
> massimo di operazioni in corso (prestiti+prenotazioni) dopo il quale si
> blocca la possibilit? di fare prenotazioni','Integer');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('maxreserves','2','','Definisce il numero
> massimo di prenotazioni che un utente pu? effettuare.','Integer');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('maxItemsInSearchResults',20,'Specify the maximum number of items to
> display for each result on a page of results',NULL,'free');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('memberofinstitution','0','','Se ON, gli
> utenti possono essere linkati alle istituzioni.','YesNo');
> +insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('MergeAuthoritiesOnUpdate','1','','Se ON,
> aggiornando le authorities saranno automaticamente aggiornati anche i record
> bibliografici','YesNo');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('minPasswordLength','3','','Specifica la
> lunghezza minima della password sia per l\'utente che per lo staff','free');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('noissuescharge','5','','Definisce l?ammontare
> massimo di multa che un utente pu? raggiungere prima di venir sospeso dal
> prestito','Integer');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('noItemTypeImages','0','','Se Attivo,
> disabilita le immagini relative al tipo documento','YesNo');
> @@ -130,6 +135,7 @@ insert into `systempreferences` (`variable`, `value`,
> `options`, `explanation`,
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('OPACNoResultsFound','','Display this HTML
> when no results are found for a search in the OPAC','70|10','Textarea');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('OPACnumSearchResults','20','','Specifica il
> numero massimo di risposte da visualizzare nella pagina dei risultati
> ','Integer');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('OpacPasswordChange','1','','Se ON, abilita
> l\'utente alla modifica della password nell\'OPAC (disabiltare la funzione
> quando ? usato LDAP auth)','YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacPrivacy', '0', 'if ON, allows patrons to define their privacy
> rules (reading history)',NULL,'YesNo');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('opacreadinghistory','1','','Se ON, si abilita
> la visualizzazione dello storico circolazione utente nell\'OPAC','YesNo');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('OpacRenewalAllowed','0','','Se ON, gli utenti
> possono rinnovare i propri prestiti direttamente dal proprio account
> OPAC','YesNo');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('OPACShelfBrowser','0','','Abilita/disabilita
> una ricerca per scaffale (Shelf Browser) nella pagina dettagli documento.
> ATTENZIONE: questa feature consuma molte risorse nelle collezioni molto
> grandi.','YesNo');
> @@ -153,6 +159,7 @@ insert into `systempreferences` (`variable`, `value`,
> `options`, `explanation`,
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('QueryStemming','0','','Se ON, abilita le
> ricerche con lo stemming (uso di forme variabili)','YesNo');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('QueryWeightFields','0','','Se ON, abilita le
> opzioni di ricerca per dare uno peso diverso ai vari campi. Opzione
> sperimentale','YesNo');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('RandomizeHoldsQueueWeight','0','','Se ON, la
> coda delle prenotazione nella circolazione avr? un ordine casuale per tutte
> le collocazioni o solo per quelle collocazioni specificate sotto
> StaticHoldsQueueWeight, se impostato.','YesNo');
> +insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('ReceiveBackIssues','5','','Numero di
> periodici precedenti da visualizzare quando si guarda il dettaglio di una
> sottoscrizione','');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`)
> values('RenewalPeriodBase','date_due','date_due|now','Per impostare se la
> data di rinnovo deve essere conteggiata a partire dalla data di scadenza del
> prestito o a partire dal momento in cui l?utente ne chiede il
> rinnovo.','Choice');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('RenewSerialAddsSuggestion','0','','Se ON,
> puoi aggiungere un nuovo suggerimento durante il rinnovo di un
> periodico','YesNo');
> insert into `systempreferences` (`variable`, `value`, `options`,
> `explanation`, `type`) values('RequestOnOpac','1','','Se ON, si abilitano
> gli utenti globalmente a inserire prenotazione nell\'OPAC','YesNo');
> diff --git a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql
> b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql
> index c87729c..8689c4c 100644
> --- a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql
> +++ b/installer/data/mysql/pl-PL/mandatory/sysprefs.sql
> @@ -9,7 +9,8 @@ INSERT INTO `systempreferences`
> (variable,value,explanation,options,type) VALUES
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AmazonLocale','US','Use to set the Locale of your Amazon.com Web
> Services','US|CA|DE|FR|JP|UK','Choice');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AWSAccessKeyID','','See: http://aws.amazon.com','','free');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AmazonAssocTag','','See: http://aws.amazon.com','','free');
> -INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonSuggestions',0,'Set to anonymous borrowernumber to enable
> Anonymous suggestions',NULL,'free');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonSuggestions',0,'Set to enable Anonymous suggestions to
> AnonymousPatron borrowernumber',NULL,'YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonymousPatron', '0', 'Set the identifier (borrowernumber) of the
> anonymous patron. Used for Suggestion and reading history privacy',NULL,'');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('Babeltheque',0,'Turn ON Babeltheque content - See babeltheque.comto subscribe to this service','','YesNo');
>
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('authoritysep','--','Used to separate a list of authorities in a
> display. Usually --',10,'free');
> @@ -78,6 +79,7 @@ INSERT INTO `systempreferences`
> (variable,value,explanation,options,type) VALUES
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacMainUserBlock','Welcome to Koha...\r\n','A user-defined
> block of HTML in the main content area of the opac main
> page','70|10','Textarea');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacNav','Important links here.','Use HTML tags to add navigational
> links to the left-hand navigational bar in OPAC','70|10','Textarea');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacPasswordChange',1,'If ON, enables patron-initiated password
> change in OPAC (disable it when using LDAP auth)',NULL,'YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacPrivacy', '0', 'if ON, allows patrons to define their privacy
> rules (reading history)',NULL,'YesNo');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacreadinghistory',1,'If ON, enables display of Patron Circulation
> History in OPAC','','YesNo');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacsmallimage','','Enter a complete URL to an image to replace the
> default Koha logo','','free');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacstylesheet','','Enter a complete URL to use an alternate layout
> stylesheet in OPAC','','free');
> diff --git
> a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
> b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
> index 993c6c3..c862e60 100644
> ---
> a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
> +++
> b/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql
> @@ -24,7 +24,8 @@ INSERT INTO `systempreferences`
> (variable,value,explanation,options,type) VALUES
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AmazonLocale','US','Use to set the Locale of your Amazon.com Web
> Services','US|CA|DE|FR|JP|UK','Choice');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AWSAccessKeyID','','See: http://aws.amazon.com','','free');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AmazonAssocTag','','See: http://aws.amazon.com','','free');
> -INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonSuggestions',0,'Set to anonymous borrowernumber to enable
> Anonymous suggestions',NULL,'free');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonSuggestions',0,'Set to enable Anonymous suggestions to
> AnonymousPatron borrowernumber',NULL,'YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonymousPatron', '0', 'Set the identifier (borrowernumber) of the
> anonymous patron. Used for Suggestion and reading history privacy',NULL,'');
>
>
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('authoritysep','--','Used to separate a list of authorities in a
> display. Usually --',10,'free');
> @@ -107,6 +108,7 @@ INSERT INTO `systempreferences`
> (variable,value,explanation,options,type) VALUES
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacMainUserBlock','????? ?????????? ? ???? Koha...\r\n','A
> user-defined block of HTML in the main content area of the opac main
> page','50|20','Textarea');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacNav','????? ????? ?????? ??????.','Use HTML tags to add
> navigational links to the left-hand navigational bar in
> OPAC','70|10','Textarea');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacPasswordChange',1,'If ON, enables patron-initiated password
> change in OPAC (disable it when using LDAP auth)',NULL,'YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacPrivacy', '0', 'if ON, allows patrons to define their privacy
> rules (reading history)',NULL,'YesNo');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacreadinghistory',1,'If ON, enables display of Patron Circulation
> History in OPAC','','YesNo');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacsmallimage','','Enter a complete URL to an image to replace the
> default Koha logo','','free');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacstylesheet','','Enter a complete URL to use an alternate layout
> stylesheet in OPAC','','free');
> diff --git
> a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
> b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
> index 3416b2e..82e285b 100644
> ---
> a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
> +++
> b/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql
> @@ -24,8 +24,8 @@ INSERT INTO `systempreferences`
> (variable,value,explanation,options,type) VALUES
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AmazonLocale','US','Use to set the Locale of your Amazon.com Web
> Services','US|CA|DE|FR|JP|UK','Choice');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AWSAccessKeyID','','See: http://aws.amazon.com','','free');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AmazonAssocTag','','See: http://aws.amazon.com','','free');
> -INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonSuggestions',0,'Set to anonymous borrowernumber to enable
> Anonymous suggestions',NULL,'free');
> -
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonSuggestions',0,'Set to enable Anonymous suggestions to
> AnonymousPatron borrowernumber',NULL,'YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('AnonymousPatron', '0', 'Set the identifier (borrowernumber) of the
> anonymous patron. Used for Suggestion and reading history privacy',NULL,'');
>
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('authoritysep','--','Used to separate a list of authorities in a
> display. Usually --',10,'free');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('autoBarcode','incremental','Used to autogenerate a barcode:
> incremental will be of the form 1, 2, 3; annual of the form 2007-0001,
> 2007-0002; hbyymmincr of the form HB08010001 where HB=Home
> Branch','incremental|annual|hbyymmincr|OFF','Choice');
> @@ -107,6 +107,7 @@ INSERT INTO `systempreferences`
> (variable,value,explanation,options,type) VALUES
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacMainUserBlock','??????? ? ???? Koha...\r\n','A user-defined
> block of HTML in the main content area of the opac main
> page','50|20','Textarea');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacNav','??? ?????? ??????? ?????????.','Use HTML tags to add
> navigational links to the left-hand navigational bar in
> OPAC','70|10','Textarea');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacPasswordChange',1,'If ON, enables patron-initiated password
> change in OPAC (disable it when using LDAP auth)',NULL,'YesNo');
> +INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('OpacPrivacy', '0', 'if ON, allows patrons to define their privacy
> rules (reading history)',NULL,'YesNo');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacreadinghistory',1,'If ON, enables display of Patron Circulation
> History in OPAC','','YesNo');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacsmallimage','','Enter a complete URL to an image to replace the
> default Koha logo','','free');
> INSERT INTO `systempreferences` (variable,value,explanation,options,type)
> VALUES('opacstylesheet','','Enter a complete URL to use an alternate layout
> stylesheet in OPAC','','free');
> diff --git a/installer/data/mysql/updatedatabase.plb/installer/data/mysql/
> updatedatabase.pl
> index f03f48f..2d89b02 100755
> --- a/installer/data/mysql/updatedatabase.pl
> +++ b/installer/data/mysql/updatedatabase.pl
> @@ -3970,6 +3970,16 @@ if (C4::Context->preference("Version") <
> TransformToNum($DBversion)) {
> SetVersion ($DBversion);
> }
>
> +$DBversion = '3.03.00.xxx';
> +if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
> + # reimplement OpacPrivacy system preference
> + $dbh->do("INSERT INTO systempreferences
> (variable,value,explanation,options,type) VALUES('OpacPrivacy', '0', 'if ON,
> allows patrons to define their privacy rules (reading
> history)',NULL,'YesNo')");
> + $dbh->do("ALTER TABLE `borrowers` ADD `privacy` INTEGER NOT NULL
> DEFAULT 1;");
> + $dbh->do("ALTER TABLE `deletedborrowers` ADD `privacy` INTEGER NOT
> NULL DEFAULT 1;");
> + print "Upgrade to $DBversion done (OpacPrivacy reimplementation)\n";
> + SetVersion($DBversion);
> +};
> +
> =head1 FUNCTIONS
>
> =head2 DropAllForeignKeys($table)
> 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 8707c25..3014e63 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
> @@ -202,12 +202,6 @@ OPAC:
> no: "Don't allow"
> - patrons to store items in a temporary "Cart" on the OPAC.
> -
> - - pref: opacreadinghistory
> - choices:
> - yes: Allow
> - no: "Don't allow"
> - - patrons to see what books they have checked out in the past.
> - -
> - pref: OpacTopissue
> choices:
> yes: Allow
> @@ -245,12 +239,6 @@ OPAC:
> yes: Limit
> no: "Don't limit"
> - "patrons' searches to the library they are registered at."
> - -
> - - pref: AnonSuggestions
> - choices:
> - yes: Allow
> - no: "Don't allow"
> - - "patrons that aren't logged in to make purchase
> suggestions."
> # -
> # This system preference does not actually affect anything
> # - pref: OpacBrowser
> @@ -288,12 +276,37 @@ OPAC:
> - purchase suggestions from other patrons on the OPAC.
> Privacy:
> -
> + - pref: AnonSuggestions
> + choices:
> + yes: Allow
> + no: "Don't allow"
> + - "patrons that aren't logged in to make purchase suggestions.
> Suggestions are connected to the AnonymousPatron syspref"
> + -
> + - pref: opacreadinghistory
> + choices:
> + yes: Allow
> + no: "Don't allow"
> + - patrons to see what books they have checked out in the past.
> + -
> - pref: EnableOpacSearchHistory
> default: 0
> choices:
> yes: Keep
> no: "Don't keep"
> - patron search history in the OPAC.
> + -
> + - pref: OPACPrivacy
> + default: 0
> + choices:
> + yes: Allow
> + no: "Don't allow"
> + - patrons to choose their own privacy settings for their
> reading history. This requires opacreadinghistory and AnonymousPatron
> + -
> + - Use borrowernumber
> + - pref: AnonymousPatron
> + class: integer
> + - as the Anonymous Patron (for anonymous suggestions and
> reading history)
> +
> Shelf Browser:
> -
> - pref: OPACShelfBrowser
> diff --git
> a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
> b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
> index 030c78a..2cdc13a 100644
> --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
> +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tmpl
> @@ -320,6 +320,11 @@ function validate1(date) {
>
>
We take great care in protecting your privacy. On this
> screen, you can define how long we keep your reading history.
> +
Your options are:
> +
> +
Immediate deletion
> +
> +
> +
> +
> +
> +
> +
> +
> +
> +
> +
> +
> +
> +
> diff --git a/members/moremember.pl b/members/moremember.pl
> index 7de3fb0..ac98e1e 100755
> --- a/members/moremember.pl
> +++ b/members/moremember.pl
> @@ -230,6 +230,12 @@ my $lib2 = &GetSortDetails( "Bsort2", $data->{'sort2'}
> );
> $template->param( lib1 => $lib1 ) if ($lib1);
> $template->param( lib2 => $lib2 ) if ($lib2);
>
> +# Show OPAC privacy preference is system preference is set
> +if ( C4::Context->preference('OPACPrivacy') ) {
> + $template->param( OPACPrivacy => 1);
> + $template->param( "privacy".$data->{'privacy'} => 1);
> +}
> +
> # current issues
> #
> my $issue = GetPendingIssues($borrowernumber);
> diff --git a/opac/opac-privacy.pl b/opac/opac-privacy.pl
> new file mode 100755
> index 0000000..ca50560
> --- /dev/null
> +++ b/opac/opac-privacy.pl
> @@ -0,0 +1,68 @@
> +#!/usr/bin/perl
> +# This script lets the users change their privacy rules
> +#
> +# copyright 2009, BibLibre, paul.poulain at biblibre.com
> +#
> +# Koha is free software; you can redistribute it and/or modify it under
> the
> +# terms of the GNU General Public License as published by the Free
> Software
> +# Foundation; either version 2 of the License, or (at your option) any
> later
> +# version.
> +#
> +# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
> +# WARRANTY; without even the implied warranty of MERCHANTABILITY or
> FITNESS FOR
> +# A PARTICULAR PURPOSE. See the GNU General Public License for more
> details.
> +#
> +# You should have received a copy of the GNU General Public License along
> with
> +# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple
> Place,
> +# Suite 330, Boston, MA 02111-1307 USA
> +
> +use strict;
> +use CGI;
> +
> +use C4::Auth; # checkauth, getborrowernumber.
> +use C4::Context;
> +use C4::Circulation;
> +use C4::Members;
> +use C4::Output;
> +use C4::Dates;
> +
> +my $query = new CGI;
> +my $dbh = C4::Context->dbh;
> +
> +my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
> + {
> + template_name => "opac-privacy.tmpl",
> + query => $query,
> + type => "opac",
> + authnotrequired => 0,
> + flagsrequired => { borrow => 1 },
> + debug => 1,
> + }
> +);
> +
> +my $op = $query->param("op");
> +my $privacy = $query->param("privacy");
> +
> +if ($op eq "update_privacy")
> +{
> + ModPrivacy($borrowernumber,$privacy);
> + $template->param('privacy_updated' => 1);
> +}
> +if ($op eq "delete_record") {
> + # delete all reading records for items returned
> + # uses a hardcoded date ridiculously far in the future
> + AnonymiseIssueHistory('2999-12-12',$borrowernumber);
> + # confirm the user the deletion has been done
> + $template->param('deleted' => 1);
> +}
> +# get borrower privacy ....
> +my ( $borr ) = GetMemberDetails( $borrowernumber );
> +
> +$template->param( 'Ask_data' => '1',
> + 'privacy'.$borr->{'privacy'} => 1,
> + 'firstname' => $borr->{'firstname'},
> + 'surname' => $borr->{'surname'},
> + 'privacyview' => 1,
> +);
> +
> +output_html_with_http_headers $query, $cookie, $template->output;
> diff --git a/opac/opac-suggestions.pl b/opac/opac-suggestions.pl
> index a2a6670..2f0dc36 100755
> --- a/opac/opac-suggestions.pl
> +++ b/opac/opac-suggestions.pl
> @@ -48,7 +48,7 @@ if ( C4::Context->preference("AnonSuggestions") ) {
> }
> );
> if ( !$$suggestion{suggestedby} ) {
> - $$suggestion{suggestedby} =
> C4::Context->preference("AnonSuggestions");
> + $$suggestion{suggestedby} =
> C4::Context->preference("AnonymousPatron");
> }
> }
> else {
> --
> 1.5.6.5
>
> _______________________________________________
> Koha-patches mailing list
> Koha-patches at lists.koha-community.org
> http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches
> website : http://www.koha-community.org/
> git : http://git.koha-community.org/
> bugs : http://bugs.koha-community.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From chrisc at catalyst.net.nz Tue Feb 1 20:55:07 2011
From: chrisc at catalyst.net.nz (Chris Cormack)
Date: Wed, 2 Feb 2011 08:55:07 +1300
Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 3881: OPAC Privacy
reimplementation
In-Reply-To:
References: <1296366516-3342-1-git-send-email-nengard@bywatersolutions.com>
Message-ID: <20110201195507.GC27877@rorohiko>
Hi Chris
I don't think you want to pull this new feature to 3.2.x anyway ;)
Chris
--
Chris Cormack
Catalyst IT Ltd.
+64 4 803 2238
PO Box 11-053, Manners St, Wellington 6142, New Zealand
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL:
From cnighswonger at foundations.edu Tue Feb 1 21:10:24 2011
From: cnighswonger at foundations.edu (Chris Nighswonger)
Date: Tue, 1 Feb 2011 15:10:24 -0500
Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 3881: OPAC Privacy
reimplementation
In-Reply-To: <20110201195507.GC27877@rorohiko>
References: <1296366516-3342-1-git-send-email-nengard@bywatersolutions.com>
<20110201195507.GC27877@rorohiko>
Message-ID:
Sorry, I missed that one... :-)
Please disregard....
On Tue, Feb 1, 2011 at 2:55 PM, Chris Cormack wrote:
> Hi Chris
>
> I don't think you want to pull this new feature to 3.2.x anyway ;)
>
> Chris
> --
> Chris Cormack
> Catalyst IT Ltd.
> +64 4 803 2238
> PO Box 11-053, Manners St, Wellington 6142, New Zealand
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAk1IZRsACgkQZgbcHEvgMLOaOACffPQoehA7ja+RMjDjZ8I/dtrD
> kA4Anj+baW79F9iHB9mu2gCj1jYHTXI+
> =AJLJ
> -----END PGP SIGNATURE-----
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From chrisc at catalyst.net.nz Wed Feb 2 05:01:42 2011
From: chrisc at catalyst.net.nz (Chris Cormack)
Date: Wed, 2 Feb 2011 17:01:42 +1300
Subject: [Koha-patches] [PATCH] NormalizeString POD Fixing and variable
renaming
Message-ID: <1296619302-19177-1-git-send-email-chrisc@catalyst.net.nz>
From: Paul Poulain
POD was mistakenly telling that NFD was supposed to be the default encoding
In fact, it is not, it is NFC
So the variable $nfc to change to the not default encoding was misleading.
Renaming it into $nfd
(written by hdl)
Refactored by Chris Cormack
---
C4/Charset.pm | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/C4/Charset.pm b/C4/Charset.pm
index b3b4b72..712bd85 100644
--- a/C4/Charset.pm
+++ b/C4/Charset.pm
@@ -33,6 +33,7 @@ BEGIN {
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(
+ NormalizeString
IsStringUTF8ish
MarcToUTF8Record
SetUTF8Flag
@@ -148,27 +149,28 @@ sub SetUTF8Flag{
=head2 NormalizeString
- my $normalized_string=NormalizeString($string);
+ my $normalized_string=NormalizeString($string,$nfd,$transform);
Given a string
-
-nfc : If you want to set NFC and not NFD
+nfd : If you want to set NFD and not NFC
transform : If you expect all the signs to be removed
+
Sets the PERL UTF8 Flag on your initial data if need be
-and applies cleaning if required
+and applies cleaning if required
-Returns a utf8 NFD normalized string
+Returns a utf8 NFC normalized string
Sample code :
- my $string=NormalizeString ("l'ornithopt??re");
- #results into ornithopt??re in NFD form and sets UTF8 Flag
+ my $string=NormalizeString ("l'ornithopt??re");
+ #results into ornithopt??re in NFC form and sets UTF8 Flag
=cut
+
sub NormalizeString{
- my ($string,$nfc,$transform)=@_;
+ my ($string,$nfd,$transform)=@_;
utf8::decode($string) unless (utf8::is_utf8($string));
- if ($nfc){
+ if ($nfd){
$string= NFD($string);
}
else {
--
1.7.1
From Katrin.Fischer.83 at web.de Wed Feb 2 06:59:36 2011
From: Katrin.Fischer.83 at web.de (Katrin Fischer)
Date: Wed, 2 Feb 2011 06:59:36 +0100
Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 4103 In Pro Adv Search,
superlibrarian search always all libraries
Message-ID: <1296626376-435-1-git-send-email-Katrin.Fischer.83@web.de>
From: Fr?d?ric Demians
Now, when 'independantbranches' syspref is activated, 'Individual Libraries'
combo list is set by default to the current user branch. It shouldn't be the
case for superlibrarian user who is supposed to manage all libraries.
Signed-off-by: Katrin Fischer
The pull down for 'Individual Libaries' now shows 'All Libraries'
as default setting for superlibrarians.
Without being superlibrarian home branch is still default.
---
catalogue/search.pl | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
diff --git a/catalogue/search.pl b/catalogue/search.pl
index 8cb737d..b0fea2a 100755
--- a/catalogue/search.pl
+++ b/catalogue/search.pl
@@ -207,16 +207,20 @@ if (C4::Context->preference("marcflavour") eq "UNIMARC" ) {
# load the branches
my $branches = GetBranches();
-my @branch_loop;
-# we need to know the borrower branch code to set a default branch
-my $borrowerbranchcode = C4::Context->userenv->{'branch'};
-
-for my $branch_hash (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) {
- # if independantbranches is activated, set the default branch to the borrower branch
- my $selected = (C4::Context->preference("independantbranches") and ($borrowerbranchcode eq $branch_hash)) ? 1 : undef;
- push @branch_loop, {value => "$branch_hash" , branchname => $branches->{$branch_hash}->{'branchname'}, selected => $selected};
-}
+# Populate branch_loop with all branches sorted by their name. If
+# independantbranches is activated, set the default branch to the borrower
+# branch, except for superlibrarian who need to search all libraries.
+my $user = C4::Context->userenv;
+my @branch_loop = map {
+ {
+ value => $_,
+ branchname => $branches->{$_}->{branchname},
+ selected => $user->{branch} eq $_ && C4::Branch::onlymine(),
+ }
+} sort {
+ $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname}
+} keys %$branches;
my $categories = GetBranchCategories(undef,'searchdomain');
--
1.7.1
From colin.campbell at ptfs-europe.com Wed Feb 2 10:31:19 2011
From: colin.campbell at ptfs-europe.com (Colin Campbell)
Date: Wed, 02 Feb 2011 09:31:19 +0000
Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 3881: OPAC
Privacy reimplementation
In-Reply-To: <1296366516-3342-1-git-send-email-nengard@bywatersolutions.com>
References: <1296366516-3342-1-git-send-email-nengard@bywatersolutions.com>
Message-ID: <4D492467.2040107@ptfs-europe.com>
On 30/01/11 05:48, Nicole Engard wrote:
> From: Ian Walls
>
> Reimplements Paul Poulain's original OPAC Privacy patch, with some minor improvements and changes to wording
>
Patch adds privacy attribute to borrowers and deletedborrowers table.
This is already done in db changes 3.1.0.72 and 3.3.0.6. Causes error in
upgrade
Colin
--
Colin Campbell
Chief Software Engineer,
PTFS Europe Limited
Content Management and Library Solutions
+44 (0) 845 557 5634 (phone)
+44 (0) 7759 633626 (mobile)
colin.campbell at ptfs-europe.com
skype: colin_campbell2
http://www.ptfs-europe.com
From gmcharlt at gmail.com Wed Feb 2 15:30:07 2011
From: gmcharlt at gmail.com (Galen Charlton)
Date: Wed, 2 Feb 2011 09:30:07 -0500
Subject: [Koha-patches] [PATCH] [SIGNED-OFF] Bug 3881: OPAC Privacy
reimplementation
In-Reply-To: <1296366516-3342-1-git-send-email-nengard@bywatersolutions.com>
References: <1296366516-3342-1-git-send-email-nengard@bywatersolutions.com>
Message-ID:
Hi,
On Sun, Jan 30, 2011 at 12:48 AM, Nicole Engard
wrote:
> +use strict;
> +use CGI;
use warnings?
Regards,
Galen
--
Galen Charlton
gmcharlt at gmail.com
From M.de.Rooy at rijksmuseum.nl Wed Feb 2 16:50:49 2011
From: M.de.Rooy at rijksmuseum.nl (Marcel de Rooy)
Date: Wed, 2 Feb 2011 15:50:49 +0000
Subject: [Koha-patches] [PATCH] [REVISED] 5622: Improve display of MARC21
773 field in XSLT detail view
Message-ID: <809BE39CD64BFD4EB9036172EBCCFA311DBEA1@S-MAIL-1B.rijksmuseum.intra>
Applies change to OPAC and staff detail view.
Chops punctuation. Adds 773g. Strips MARC org code from URL.
Utils code is used as basis for patches #5662 and #5663 too.
---
.../prog/en/xslt/MARC21slim2intranetDetail.xsl | 10 +++++-----
.../intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl | 18 ++++++++++++++++++
.../prog/en/xslt/MARC21slim2OPACDetail.xsl | 10 +++++-----
.../opac-tmpl/prog/en/xslt/MARC21slimUtils.xsl | 18 ++++++++++++++++++
4 files changed, 46 insertions(+), 10 deletions(-)
diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
index edaf280..ebc8a86 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl
@@ -565,19 +565,19 @@
-
+ at
-
+
-
-
+ /cgi-bin/koha/catalogue/search.pl?q=Control-number:
+ /cgi-bin/koha/catalogue/search.pl?q=Title:
-
+
diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl
index d101723..559de13 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl
+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slimUtils.xsl
@@ -65,6 +65,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -228,6 +232,7 @@ $(document).ready(function(){