diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-02-14 15:20:49 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-02-14 15:20:49 -0500 |
commit | 8be2b60aaca495b84c299cf69ee8958603bd7204 (patch) | |
tree | d3fc0fb7c235fe7f193bd10a3e56cfbb0cf8e45a | |
parent | 9192a8837505d47fa4cd8b4fb661fb5a102e01df (diff) | |
download | ikiwiki-8be2b60aaca495b84c299cf69ee8958603bd7204.tar ikiwiki-8be2b60aaca495b84c299cf69ee8958603bd7204.tar.gz |
* The search plugin needs to override <base> to point to the directory
containing ikiwiki.cgi, but this should not change the urls to the style
sheets etc. Add a new forcebareurl parameter to misctemplate to allow
it to do that.
-rw-r--r-- | IkiWiki/Plugin/search.pm | 2 | ||||
-rw-r--r-- | debian/changelog | 4 | ||||
-rw-r--r-- | doc/bugs/search_plugin_uses_wrong_css_path.mdwn | 3 | ||||
-rw-r--r-- | templates/misc.tmpl | 4 |
4 files changed, 12 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/search.pm b/IkiWiki/Plugin/search.pm index da818e5cf..9bf223cf0 100644 --- a/IkiWiki/Plugin/search.pm +++ b/IkiWiki/Plugin/search.pm @@ -96,7 +96,7 @@ sub estcfg () { #{{{ open(TEMPLATE, ">:utf8", $newfile) || error("open $newfile: $!", $cleanup); print TEMPLATE IkiWiki::misctemplate("search", "<!--ESTFORM-->\n\n<!--ESTRESULT-->\n\n<!--ESTINFO-->\n\n", - baseurl => IkiWiki::dirname($config{cgiurl})."/") || + forcebaseurl => IkiWiki::dirname($config{cgiurl})."/") || error("write $newfile: $!", $cleanup); close TEMPLATE || error("save $newfile: $!", $cleanup); rename($newfile, "$estdir/$cgi.tmpl") || diff --git a/debian/changelog b/debian/changelog index 70935c1d7..d56c132ad 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,10 @@ ikiwiki (2.40) UNRELEASED; urgency=low * Setting NOTAINT=1 had no effect when building ikiwiki itself, fix this. * Depend on HTML::Scrubber, since the scrubber is enabled by default and dies if its can't be loaded. + * The search plugin needs to override <base> to point to the directory + containing ikiwiki.cgi, but this should not change the urls to the style + sheets etc. Add a new forcebareurl parameter to misctemplate to allow + it to do that. -- Josh Triplett <josh@freedesktop.org> Sun, 10 Feb 2008 13:18:58 -0800 diff --git a/doc/bugs/search_plugin_uses_wrong_css_path.mdwn b/doc/bugs/search_plugin_uses_wrong_css_path.mdwn index fc3f8a6e4..9eeb3c374 100644 --- a/doc/bugs/search_plugin_uses_wrong_css_path.mdwn +++ b/doc/bugs/search_plugin_uses_wrong_css_path.mdwn @@ -9,3 +9,6 @@ Maybe misctemplate() and misc.tmpl should use an additional variable which points always to the base of the wiki. e.g. use "wikibase" for css and favicon and "baseurl" for the <base> tag. + +> thanks for pointing this bug out, I've fixed it --[[Joey]]. +[[tag done]] diff --git a/templates/misc.tmpl b/templates/misc.tmpl index 184920eaf..7f65217d1 100644 --- a/templates/misc.tmpl +++ b/templates/misc.tmpl @@ -2,7 +2,11 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> +<TMPL_IF NAME="FORCEBASEURL"> +<base href="<TMPL_VAR FORCEBASEURL>" /> +<TMPL_ELSE> <base href="<TMPL_VAR BASEURL>" /> +</TMPL_IF> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title><TMPL_VAR TITLE></title> <link rel="stylesheet" href="<TMPL_VAR BASEURL>style.css" type="text/css" /> |