]> sipb.mit.edu Git - ikiwiki.git/commitdiff
* The search plugin needs to override <base> to point to the directory
authorJoey Hess <joey@kodama.kitenet.net>
Thu, 14 Feb 2008 20:20:49 +0000 (15:20 -0500)
committerJoey Hess <joey@kodama.kitenet.net>
Thu, 14 Feb 2008 20:20:49 +0000 (15:20 -0500)
  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.

IkiWiki/Plugin/search.pm
debian/changelog
doc/bugs/search_plugin_uses_wrong_css_path.mdwn
templates/misc.tmpl

index da818e5cfea6c2f87719d78648dfa32d779491d0..9bf223cf000310463175c2cd579aaa9c603d9010 100644 (file)
@@ -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") ||
index 70935c1d7b2ad51d09a67105e4044715785edef6..d56c132adf73a44c1b40271b9dc6b155efa325cc 100644 (file)
@@ -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
 
index fc3f8a6e4bf8f20428695da14c52015409c8e4f2..9eeb3c37444c3c4f619b165b62848a31205bbc8c 100644 (file)
@@ -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 &lt;base&gt; tag.
+
+> thanks for pointing this bug out, I've fixed it --[[Joey]].
+[[tag done]]
index 184920eaf267ea488a9ccacd62284bc41b9cedea..7f65217d124b0423d523814d2964d18e0d24952f 100644 (file)
@@ -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" />