From b7ac86a5542631a857497f0bd0f20f31b4101cb0 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 Content-Type: text/plain; charset="utf-8" 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 --- C4/VirtualShelves.pm | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/C4/VirtualShelves.pm b/C4/VirtualShelves.pm index 0bb4b56..4e68248 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)); -- 1.7.7.6