diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-02-03 00:23:04 -0500 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-02-03 00:23:04 -0500 |
commit | 80915c830a03cf67c6770ef5e62d5178824b101e (patch) | |
tree | 50abcbb875fb3c31cefb00e2092812138b6343b0 /IkiWiki | |
parent | 7a7794c72ef6dad934a97d394a104bbe06a70e88 (diff) |
* 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.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/CGI.pm | 5 |
1 files changed, 1 insertions, 4 deletions
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); |