From 80915c830a03cf67c6770ef5e62d5178824b101e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 3 Feb 2008 00:23:04 -0500 Subject: * cgi hooks are now run before ikiwiki state is loaded. * This allows locking the wiki before loading state, which avoids some tricky locking code when saving a web edit. --- IkiWiki/CGI.pm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'IkiWiki/CGI.pm') diff --git a/IkiWiki/CGI.pm b/IkiWiki/CGI.pm index c8c1b63dd..3f588e427 100644 --- a/IkiWiki/CGI.pm +++ b/IkiWiki/CGI.pm @@ -539,10 +539,6 @@ sub cgi_editpage ($$) { #{{{ # may have been committed while the post-commit hook was # disabled. require IkiWiki::Render; - # Reload index, since the first time it's loaded is before - # the wiki is locked, and things may have changed in the - # meantime. - loadindex(); refresh(); saveindex(); @@ -616,6 +612,7 @@ sub cgi (;$$) { #{{{ # Need to lock the wiki before getting a session. lockwiki(); + loadindex(); if (! $session) { $session=cgi_getsession($q); -- cgit v1.2.3