diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-08-21 22:27:02 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-08-21 22:27:02 +0000 |
commit | cf3021ef3f5cb839195585d601de76df519da510 (patch) | |
tree | e239dbfdec8b90f9aa7654b5bd0ce10cdb542611 /IkiWiki | |
parent | 0dc0d8e3b5f2db006ac83d0d7f336c2fda51b4bb (diff) | |
download | ikiwiki-cf3021ef3f5cb839195585d601de76df519da510.tar ikiwiki-cf3021ef3f5cb839195585d601de76df519da510.tar.gz |
* Fixed a bug with previews of subpages having broken links to top-level
pages.
* Change how the stylesheet url is determined in the templates: Remove
STYLEURL and add BASEURL to all templates (some already had it). This
new more general variable can be used to link to other things (eg, images)
from the template, as well as stylesheets.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/CGI.pm | 12 | ||||
-rw-r--r-- | IkiWiki/Render.pm | 2 |
2 files changed, 6 insertions, 8 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 4c15be0ae..7d4ba146f 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -70,8 +70,7 @@ sub cgi_recentchanges ($) { #{{{ indexlink => indexlink(), wikiname => $config{wikiname}, changelog => [rcs_recentchanges(100)], - styleurl => styleurl(), - baseurl => "$config{url}/", + baseurl => baseurl(), ); print $q->header(-charset=>'utf-8'), $template->output; } #}}} @@ -100,7 +99,7 @@ sub cgi_signin ($$) { #{{{ header => 0, template => (-e "$config{templatedir}/signin.tmpl" ? {template_params("signin.tmpl")} : ""), - stylesheet => styleurl(), + stylesheet => baseurl()."style.css", ); decode_form_utf8($form); @@ -267,7 +266,7 @@ sub cgi_prefs ($$) { #{{{ action => $config{cgiurl}, template => (-e "$config{templatedir}/prefs.tmpl" ? {template_params("prefs.tmpl")} : ""), - stylesheet => styleurl(), + stylesheet => baseurl()."style.css", ); my @buttons=("Save Preferences", "Logout", "Cancel"); @@ -394,8 +393,7 @@ sub cgi_editpage ($$) { #{{{ $form->tmpl_param("indexlink", indexlink()); $form->tmpl_param("helponformattinglink", htmllink("", "", "HelpOnFormatting", 1)); - $form->tmpl_param("styleurl", styleurl()); - $form->tmpl_param("baseurl", "$config{url}/"); + $form->tmpl_param("baseurl", baseurl()); if (! $form->submitted) { $form->field(name => "rcsinfo", value => rcs_prepedit($file), force => 1); @@ -414,7 +412,7 @@ sub cgi_editpage ($$) { #{{{ $form->field(name => "comments", value => $comments, force => 1); $form->tmpl_param("page_preview", - htmlize($type, linkify($page, $page, filter($page, $content)))); + htmlize($type, linkify($page, "", filter($page, $content)))); } else { $form->tmpl_param("page_preview", ""); diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index b4b95e8d4..ddd146922 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -180,7 +180,7 @@ sub genpage ($$$) { #{{{ content => $content, backlinks => [backlinks($page)], mtime => displaytime($mtime), - styleurl => styleurl($page), + baseurl => baseurl($page), ); run_hooks(pagetemplate => sub { |