From a3f224cb6cf82b89cf0cbadbd661fd5d71ebf8ae Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 3 Feb 2008 19:51:00 -0500 Subject: move saveindex call into preview block This call is only present to handle the case where previewing a page actually causes files to be rendered. --- IkiWiki/CGI.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index 1ec23df68..4d4464c28 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -357,6 +357,8 @@ sub cgi_editpage ($$) { #{{{ linkify($page, "", preprocess($page, $page, filter($page, $page, $content), 0, 1)))); + # previewing may have created files on disk + saveindex(); } elsif ($form->submitted eq "Save Page") { $form->tmpl_param("page_preview", ""); @@ -448,7 +450,6 @@ sub cgi_editpage ($$) { #{{{ } showform($form, \@buttons, $session, $q); - saveindex(); } else { # save page -- cgit v1.2.3