diff options
author | Joey Hess <joey@kitenet.net> | 2010-07-26 16:23:10 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-07-26 16:23:10 -0400 |
commit | b300bc9650a40885cd8c6e0a646436539aed95c1 (patch) | |
tree | f63910bb376b24f7a9b1e3f44c21d85e349505ab /IkiWiki | |
parent | aa78c142b8fdc44e480f7cec0cc444680a1f2f46 (diff) | |
download | ikiwiki-b300bc9650a40885cd8c6e0a646436539aed95c1.tar ikiwiki-b300bc9650a40885cd8c6e0a646436539aed95c1.tar.gz |
use new disable hook
clean up xapian db when plugin is disabled
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/search.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index ff5d0ccbe..1cf762fce 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -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 |