From: Joey Hess Date: Mon, 4 Feb 2008 00:51:00 +0000 (-0500) Subject: move saveindex call into preview block X-Git-Tag: 2.31~34 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a3f224cb6cf82b89cf0cbadbd661fd5d71ebf8ae;p=ikiwiki.git 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. --- 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