From d8f142ea5037e95fcca0bd6ae161b674ccd2bfd7 Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Sat, 12 Jun 2004 11:27:27 +0000 Subject: [PATCH] (NewNotFoundHandlerDeletePage): New function to delete cached copies of pages that are deleted. --- modules/not-found-handler.pl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/not-found-handler.pl b/modules/not-found-handler.pl index 4cd73094..9241208c 100644 --- a/modules/not-found-handler.pl +++ b/modules/not-found-handler.pl @@ -16,7 +16,7 @@ # 59 Temple Place, Suite 330 # Boston, MA 02111-1307 USA -$ModulesDescription .= '

$Id: not-found-handler.pl,v 1.1 2004/06/05 00:31:23 as Exp $

'; +$ModulesDescription .= '

$Id: not-found-handler.pl,v 1.2 2004/06/12 11:27:27 as Exp $

'; use vars qw($NotFoundHandlerDir); @@ -37,3 +37,12 @@ sub NewNotFoundHandlerSave { unlink("$NotFoundHandlerDir/$id"); } } + +*OldNotFoundHandlerDeletePage = *DeletePage; +*DeletePage = *NewNotFoundHandlerDeletePage; + +sub NewNotFoundHandlerDeletePage { + my $id = shift; + unlink("$NotFoundHandlerDir/$id"); + return OldNotFoundHandlerDeletePage($id); +}