From 43bab583fc0c9197c2f819d7416a90d86887f013 Mon Sep 17 00:00:00 2001 From: Nicolas Hunstein Date: Fri, 24 Jan 2025 13:47:22 +0000 Subject: [PATCH] Bug 31270: update "self reg" updates string "self reg" to "self-reg" to test: - got to installer/data/mysql/mandatory/sysprt/db_dependent/Koha/Patronefs.sql, koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref, misc/cronjobs/cleanup_database.pl and t/db_dependent/Koha/Patron.t - check there are strings in the form "self reg" - apply patch - strings are in the form "self-reg" --- installer/data/mysql/mandatory/sysprefs.sql | 4 ++-- .../prog/en/modules/admin/preferences/opac.pref | 12 ++++++------ misc/cronjobs/cleanup_database.pl | 4 ++-- t/db_dependent/Koha/Patron.t | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index ede2d4d275..3221721dd0 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -616,10 +616,10 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('PatronSelfRegistrationBorrowerUnwantedField','',NULL,'Name the fields you don\'t want to display when registering a new patron via the OPAC.','free'), ('PatronSelfRegistrationConfirmEmail', '0', NULL, 'Require users to confirm their email address by entering it twice.', 'YesNo'), ('PatronSelfRegistrationDefaultCategory','','','A patron registered via the OPAC will receive a borrower category code set in this system preference.','free'), -('PatronSelfRegistrationEmailMustBeUnique', '0', 'If set, the field borrowers.email will be considered as a unique field on self registering', NULL, 'YesNo'), +('PatronSelfRegistrationEmailMustBeUnique', '0', 'If set, the field borrowers.email will be considered as a unique field on self-registering', NULL, 'YesNo'), ('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'), ('PatronSelfRegistrationLibraryList','',NULL,'Only display libraries listed. If empty, all libraries are displayed.','Free'), -('PatronSelfRegistrationPrefillForm','1',NULL,'Display password and prefill login form after a patron has self registered','YesNo'), +('PatronSelfRegistrationPrefillForm','1',NULL,'Display password and prefill login form after a patron has self-registered','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 their account.','YesNo'), ('PatronsPerPage','20','20','Number of Patrons Per Page displayed by default','Integer'), ('PhoneNotification','0',NULL,'If ON, enables generation of phone notifications to be sent by plugins','YesNo'), 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 abdd70c2e2..a16cf9d73d 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 @@ -792,7 +792,7 @@ OPAC: 0: "Don't use" - "the item collection code when finding items for the shelf browser." - Self registration and modification: + Self-registration and modification: - - pref: PatronSelfRegistration choices: @@ -812,8 +812,8 @@ OPAC: - pref: PatronSelfRegistrationDefaultCategory choices: patron-categories - "as the default patron category for patrons registered via the OPAC." - - "
WARNING: Do not use a regular patron category for self registration." - - "
If the misc/cronjobs/cleanup_database.pl cronjob is setup to delete unverified and unfinished OPAC self registrations, it will permanently and unrecoverably delete all patrons that have registered more than PatronSelfRegistrationExpireTemporaryAccountsDelay days ago (unless that delay is empty or zero)." + - "
WARNING: Do not use a regular patron category for self-registration." + - "
If the misc/cronjobs/cleanup_database.pl cronjob is setup to delete unverified and unfinished OPAC self-registrations, it will permanently and unrecoverably delete all patrons that have registered more than PatronSelfRegistrationExpireTemporaryAccountsDelay days ago (unless that delay is empty or zero)." - - Delete patrons still in the category indicated by PatronSelfRegistrationDefaultCategory - pref: PatronSelfRegistrationExpireTemporaryAccountsDelay @@ -852,9 +852,9 @@ OPAC: choices: 1: "Consider" 0: "Don't consider" - - "patron's email (borrowers.email) as unique on self registering. An email won't be accepted if it already exists in the database." + - "patron's email (borrowers.email) as unique on self-registering. An email won't be accepted if it already exists in the database." - - - "Enable the self registration for the following libraries:" + - "Enable the self-registration for the following libraries:" - pref: PatronSelfRegistrationLibraryList - (separate branchcode with |). - If empty, all libraries will be listed. @@ -863,7 +863,7 @@ OPAC: choices: 1: "Show and prefill" 0: "Don't show and prefill" - - "password and login form after a patron has self registered." + - "password and login form after a patron has self-registered." - - pref: PatronSelfRegistrationConfirmEmail choices: diff --git a/misc/cronjobs/cleanup_database.pl b/misc/cronjobs/cleanup_database.pl index d76499b873..b86f973b6a 100755 --- a/misc/cronjobs/cleanup_database.pl +++ b/misc/cronjobs/cleanup_database.pl @@ -98,8 +98,8 @@ Usage: $0 [-h|--help] [--confirm] [--sessions] [--sessdays DAYS] [-v|--verbose] --restrictions DAYS purge patrons restrictions expired since more than DAYS days. Defaults to 30 days if no days specified. --all-restrictions purge all expired patrons restrictions. - --del-exp-selfreg Delete expired self registration accounts - --del-unv-selfreg DAYS Delete unverified self registrations older than DAYS + --del-exp-selfreg Delete expired self-registration accounts + --del-unv-selfreg DAYS Delete unverified self-registrations older than DAYS --unique-holidays DAYS Delete all unique holidays older than DAYS --temp-uploads Delete temporary uploads. --temp-uploads-days DAYS Override the corresponding preference value. diff --git a/t/db_dependent/Koha/Patron.t b/t/db_dependent/Koha/Patron.t index 23acb9aa80..32189c6c95 100755 --- a/t/db_dependent/Koha/Patron.t +++ b/t/db_dependent/Koha/Patron.t @@ -1593,7 +1593,7 @@ subtest 'force_password_reset_when_set_by_staff tests' => sub { $patron->delete()->store()->discard_changes(); is( $patron->password_expired, 0, - "Patron forced into changing password but patron is self registered, password not expired." + "Patron forced into changing password but patron is self-registered, password not expired." ); $schema->storage->txn_rollback; -- 2.39.5