]> git.koha-community.org Git - koha.git/commit
Bug 13049: Merge selfreg cron jobs into cleanup_database
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 9 Oct 2014 07:52:44 +0000 (09:52 +0200)
committerTomas Cohen Arazi <tomascohen@unc.edu.ar>
Tue, 28 Jul 2015 13:24:02 +0000 (10:24 -0300)
commit5c3c67972841f7ec99638a9387bd53d62ce9ef7d
tree897fa1171c45c4fe0ede5a4c8fc8066b57261aa8
parent41f3cab1f53b4fddb382a9d4ebd1afa01293baea
Bug 13049: Merge selfreg cron jobs into cleanup_database

This patch moves the core code of two selfreg cron jobs into the Members
module. The new routines are called from cleanup_database with two new
parameters. The old cron jobs are now wrappers to cleanup_database.
As a bonus, we can add a unit test now.

In time, we can obsolete the selfreg cron jobs. For now, the code is in one
place and behavior does not change.
A next step (as described on the Bugzilla report) would be: remove the Delay
pref for self regs.

Test plan:
Run the unit test t/db_dependent/Members.t.
Test the two new parameters of cleanup_database.pl.
Verify if delete_expired_opac_registrations.pl still works.
Same for delete_unverified_opac_registrations.pl.

Signed-off-by: Frederic Demians <f.demians@tamil.fr>
. Fixed minor merge confict on UT & cleanup_database.pl
. UT ok
. The two deprecated scripts still work as before, with a warning
  message.
. cleanup_database.pl do the deletion job, calling new C4::Members
  function rather that doing it directly.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
C4/Members.pm
misc/cronjobs/cleanup_database.pl
misc/cronjobs/delete_expired_opac_registrations.pl
misc/cronjobs/delete_unverified_opac_registrations.pl
t/db_dependent/Members.t