(NewNotFoundHandlerDeletePage): New

function to delete cached copies of pages that are deleted.
This commit is contained in:
Alex Schroeder
2004-06-12 11:27:27 +00:00
parent 0f8d0c2214
commit d8f142ea50

View File

@@ -16,7 +16,7 @@
# 59 Temple Place, Suite 330
# Boston, MA 02111-1307 USA
$ModulesDescription .= '<p>$Id: not-found-handler.pl,v 1.1 2004/06/05 00:31:23 as Exp $</p>';
$ModulesDescription .= '<p>$Id: not-found-handler.pl,v 1.2 2004/06/12 11:27:27 as Exp $</p>';
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);
}