diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-04 01:29:45 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2006-07-04 01:29:45 +0000 |
commit | f877845353e5f8cfe6d3bdad625b9c2bacee878e (patch) | |
tree | 61d1e52fd1f2725adf5115736975a43f1051ead4 /IkiWiki/CGI.pm | |
parent | 7b87549558a538e604c4368dc653eba11cb87bc9 (diff) | |
download | ikiwiki-f877845353e5f8cfe6d3bdad625b9c2bacee878e.tar ikiwiki-f877845353e5f8cfe6d3bdad625b9c2bacee878e.tar.gz |
remove leading dot from default_pageext
fix preview to not assume it's the default page type, and instead get the
type from the page
Diffstat (limited to 'IkiWiki/CGI.pm')
-rw-r--r-- | IkiWiki/CGI.pm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 5e7f77171..3e4cbe4cf 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -317,10 +317,13 @@ sub cgi_editpage ($$) { #{{{ } $page=lc($page); - my $file=$page.$config{default_pageext}; + my $file; if (exists $pagesources{lc($page)}) { $file=$pagesources{lc($page)}; } + else { + $file=$page.".".$config{default_pageext}; + } my $newfile=0; if (! -e "$config{srcdir}/$file") { $newfile=1; @@ -360,7 +363,7 @@ sub cgi_editpage ($$) { #{{{ $form->field(name => "comments", value => $comments, force => 1); $form->tmpl_param("page_preview", - htmlize($config{default_pageext}, + htmlize(pagetype($file), linkify($page, $page, $content))); } else { |