use new disable hook

clean up xapian db when plugin is disabled
master
Joey Hess 2010-07-26 16:23:10 -04:00
parent aa78c142b8
commit b300bc9650
1 changed files with 7 additions and 0 deletions

View File

@ -13,6 +13,7 @@ sub import {
hook(type => "indexhtml", id => "search", call => \&indexhtml);
hook(type => "delete", id => "search", call => \&delete);
hook(type => "cgi", id => "search", call => \&cgi);
hook(type => "disable", id => "search", call => \&disable);
}
sub getsetup () {
@ -245,4 +246,10 @@ sub setupfiles () {
}
}
sub disable () {
if (-d $config{wikistatedir}."/xapian") {
system("rm", "-rf", $config{wikistatedir}."/xapian");
}
}
1