summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/search.pm
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-01-05 17:15:38 -0400
committerJoey Hess <joey@kitenet.net>2011-01-05 17:15:38 -0400
commitd991ccf134acbc2eec83b8409a5911744f1956eb (patch)
tree9b278b4ecbe8e0ecd6f8d00a310a7255c419bec4 /IkiWiki/Plugin/search.pm
parent4a6ac6b485c7e6e312e42c3c609df693f5e531ec (diff)
use cgitemplate, remove misctemplate
Diffstat (limited to 'IkiWiki/Plugin/search.pm')
-rw-r--r--IkiWiki/Plugin/search.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm
index 78eb750b5..3f0b7c9ad 100644
--- a/IkiWiki/Plugin/search.pm
+++ b/IkiWiki/Plugin/search.pm
@@ -227,20 +227,21 @@ sub setupfiles () {
"database_dir .\n".
"template_dir ./templates\n");
- # Avoid omega interpreting anything in the misctemplate
+ # Avoid omega interpreting anything in the cgitemplate
# as an omegascript command.
- my $misctemplate=IkiWiki::misctemplate(gettext("search"), "\0",
+ eval q{use IkiWiki::CGI};
+ my $template=IkiWiki::cgitemplate(undef, gettext("search"), "\0",
searchform => "", # avoid showing the small search form
);
eval q{use HTML::Entities};
error $@ if $@;
- $misctemplate=encode_entities($misctemplate, '\$');
+ $template=encode_entities($template, '\$');
my $querytemplate=readfile(IkiWiki::template_file("searchquery.tmpl"));
- $misctemplate=~s/\0/$querytemplate/;
+ $template=~s/\0/$querytemplate/;
writefile("query", $config{wikistatedir}."/xapian/templates",
- $misctemplate);
+ $template);
$setup=1;
}
}