diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-07-17 15:16:56 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-07-17 16:17:15 -0400 |
commit | 584f3e3061e8983e4caa328d7bc16fdeba849654 (patch) | |
tree | 4417efdf3ccd866c866ec9ab2cfd1faa030346cc /IkiWiki/Plugin/search.pm | |
parent | 1b46f52043aa6eff37da3677d7bdf11944b733ab (diff) | |
download | ikiwiki-584f3e3061e8983e4caa328d7bc16fdeba849654.tar ikiwiki-584f3e3061e8983e4caa328d7bc16fdeba849654.tar.gz |
Add a postscan hook.
* Add a postscan hook.
* search: Use postscan hook, avoid updating index when previewing.
Diffstat (limited to 'IkiWiki/Plugin/search.pm')
-rw-r--r-- | IkiWiki/Plugin/search.pm | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index 284f477fa..822b5974e 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -9,7 +9,7 @@ use IkiWiki 2.00; sub import { #{{{ hook(type => "checkconfig", id => "search", call => \&checkconfig); hook(type => "pagetemplate", id => "search", call => \&pagetemplate); - hook(type => "sanitize", id => "search", call => \&index); + hook(type => "postscan", id => "search", call => \&index); hook(type => "delete", id => "search", call => \&delete); hook(type => "cgi", id => "search", call => \&cgi); } # }}} @@ -48,8 +48,6 @@ my $scrubber; my $stemmer; sub index (@) { #{{{ my %params=@_; - - return $params{content} if $IkiWiki::preprocessing{$params{destpage}}; setupfiles(); @@ -132,8 +130,6 @@ sub index (@) { #{{{ $doc->add_term($pageterm); $db->replace_document_by_term($pageterm, $doc); - - return $params{content}; } #}}} sub delete (@) { #{{{ |