From b9e0b376d00e92741497ed0b765713e2b4d23f11 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 11 Sep 2012 10:42:34 -0400 Subject: [PATCH] Bug 7067 - OPAC Borrower Self Registration - Followup - Rename PatronSelfRegistrationUseTemporaryStatus to PatronSelfRegistrationDefaultCategory Content-Type: text/plain; charset="utf-8" --- C4/Members.pm | 2 +- installer/data/mysql/sysprefs.sql | 4 ++-- installer/data/mysql/updatedatabase.pl | 4 ++-- .../prog/en/modules/admin/preferences/opac.pref | 2 +- misc/cronjobs/delete_expired_opac_registrations.pl | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index ae00805..879e3a8 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -2384,7 +2384,7 @@ sub GetBorrowersWithEmail { sub AddMember_Opac { my ( %borrower ) = @_; - $borrower{'categorycode'} = C4::Context->preference('PatronSelfRegistrationUseTemporaryStatus'); + $borrower{'categorycode'} = C4::Context->preference('PatronSelfRegistrationDefaultCategory'); my $sr = new String::Random; $sr->{'A'} = [ 'A'..'Z', 'a'..'z' ]; diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 861e430..409c5cd 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -374,7 +374,7 @@ INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' INSERT INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('PatronSelfRegistration', '0', NULL, 'If enabled, patrons will be able to register themselves via the OPAC.', 'YesNo'), ('PatronSelfRegistrationVerifyByEmail', '0', NULL, 'If enabled, any patron attempting to register themselves via the OPAC will be required to verify themselves via email to activate his or her account.', 'YesNo'), -('PatronSelfRegistrationUseTemporaryStatus', '', '', 'A patron registered via the OPAC will receive a borrower category code set in this system preference.', 'free'), -('PatronSelfRegistrationExpireTemporaryAccountsDelay', '0', NULL, 'If PatronSelfRegistrationUseTemporaryStatus is enabled, this system preference controls how long a patron can have a temporary status before the account is deleted automatically. It is an integer value representing a number of days to wait before deleting a temporary patron account. Setting it to 0 disables the deleting of temporary accounts.', 'Integer'), +('PatronSelfRegistrationDefaultCategory', '', '', 'A patron registered via the OPAC will receive a borrower category code set in this system preference.', 'free'), +('PatronSelfRegistrationExpireTemporaryAccountsDelay', '0', NULL, 'If PatronSelfRegistrationDefaultCategory is enabled, this system preference controls how long a patron can have a temporary status before the account is deleted automatically. It is an integer value representing a number of days to wait before deleting a temporary patron account. Setting it to 0 disables the deleting of temporary accounts.', 'Integer'), ('PatronSelfRegistrationBorrowerMandatoryField', 'surname|firstname', NULL , 'Choose the mandatory fields for a patron''s account, when registering via the OPAC.', 'free'), ('PatronSelfRegistrationBorrowerUnwantedField', '', NULL , 'Name the fields you don''t want to display when registering a new patron via the OPAC.', 'free'); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 495b02f..d8b6b36 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -5779,8 +5779,8 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { INSERT INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('PatronSelfRegistration', '0', NULL, 'If enabled, patrons will be able to register themselves via the OPAC.', 'YesNo'), ('PatronSelfRegistrationVerifyByEmail', '0', NULL, 'If enabled, any patron attempting to register themselves via the OPAC will be required to verify themselves via email to activate his or her account.', 'YesNo'), - ('PatronSelfRegistrationUseTemporaryStatus', '', '', 'A patron registered via the OPAC will receive a borrower category code set in this system preference.', 'free'), - ('PatronSelfRegistrationExpireTemporaryAccountsDelay', '0', NULL, 'If PatronSelfRegistrationUseTemporaryStatus is enabled, this system preference controls how long a patron can have a temporary status before the account is deleted automatically. It is an integer value representing a number of days to wait before deleting a temporary patron account. Setting it to 0 disables the deleting of temporary accounts.', 'Integer'), + ('PatronSelfRegistrationDefaultCategory', '', '', 'A patron registered via the OPAC will receive a borrower category code set in this system preference.', 'free'), + ('PatronSelfRegistrationExpireTemporaryAccountsDelay', '0', NULL, 'If PatronSelfRegistrationDefaultCategory is enabled, this system preference controls how long a patron can have a temporary status before the account is deleted automatically. It is an integer value representing a number of days to wait before deleting a temporary patron account. Setting it to 0 disables the deleting of temporary accounts.', 'Integer'), ('PatronSelfRegistrationBorrowerMandatoryField', 'surname|firstname', NULL , 'Choose the mandatory fields for a patron''s account, when registering via the OPAC.', 'free'), ('PatronSelfRegistrationBorrowerUnwantedField', '', NULL , 'Name the fields you don''t want to display when registering a new patron via the OPAC.', 'free'); "); 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 a2b005b..7e87a60 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 @@ -515,7 +515,7 @@ OPAC: - "that a self-registering patron verify his or herself via email." - - "Use the patron category code" - - pref: PatronSelfRegistrationUseTemporaryStatus + - pref: PatronSelfRegistrationDefaultCategory class: short - "as the default patron category for patrons registered via the OPAC." - diff --git a/misc/cronjobs/delete_expired_opac_registrations.pl b/misc/cronjobs/delete_expired_opac_registrations.pl index c588b03..52929ed 100755 --- a/misc/cronjobs/delete_expired_opac_registrations.pl +++ b/misc/cronjobs/delete_expired_opac_registrations.pl @@ -34,7 +34,7 @@ use C4::Members qw/ DelMember /; my $delay = C4::Context->preference('PatronSelfRegistrationExpireTemporaryAccountsDelay'); my $category_code = - C4::Context->preference('PatronSelfRegistrationUseTemporaryStatus'); + C4::Context->preference('PatronSelfRegistrationDefaultCategory'); my $query = " SELECT borrowernumber -- 1.7.2.5