From 7575a8eb8f7d69a80f5c71b6a6de1415b024b7a2 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Tue, 28 Feb 2012 15:33:33 +0100 Subject: [PATCH] Bug 7368: POD doc in VirtualShelves.pm Only moving/adding some documentation in VirtualShelves.pm. Related to earlier changes in connection with report 7310. Adding my own signoff, nothing to test here. Does Koha still work? :) Signed-off-by: Marcel de Rooy Passed-QA-by: Paul Poulain Signed-off-by: Jared Camins-Esakov --- C4/VirtualShelves.pm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index 254d732413..ed489f2d3a 100644 --- a/C4/VirtualShelves.pm +++ b/C4/VirtualShelves.pm @@ -597,16 +597,25 @@ sub ShelvesMax { return SHELVES_MASTHEAD_MAX; } +=head2 HandleDelBorrower + + HandleDelBorrower($borrower); + +When a member is deleted (DelMember in Members.pm), you should call me first. +This routine deletes/moves lists and entries for the deleted member/borrower. +You could just delete everything (and lose more than you want), but instead we +now try to save all public/shared stuff and keep others happy. + +=cut + sub HandleDelBorrower { -#when a member is deleted (DelMember in Members.pm), you should call me first -#this routine deletes/moves lists and entries for the deleted member/borrower -#you could just delete everything (and lose more than you want) -#instead we now try to save all public/shared stuff and keep others happy my ($borrower)= @_; my $query; my $dbh = C4::Context->dbh; #Delete shares of this borrower (not lists !) + #Although this would be done later via the FK cascaded delete, we do it now. + #Because it makes the following delete statement on shelves more meaningful. $query="DELETE FROM virtualshelfshares WHERE borrowernumber=?"; $dbh->do($query,undef,($borrower)); -- 2.39.5