* 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.master
parent
7a7794c72e
commit
80915c830a
|
@ -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);
|
||||
|
|
|
@ -8,6 +8,9 @@ ikiwiki (2.31) UNRELEASED; urgency=low
|
|||
too complex to do.
|
||||
* aggregate: Forking a child broke the one state that mattered: Forcing
|
||||
the aggregating page to be rebuilt. Fix this.
|
||||
* 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.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Sat, 02 Feb 2008 23:36:31 -0500
|
||||
|
||||
|
|
|
@ -222,8 +222,11 @@ source files that were rendered.
|
|||
|
||||
Use this to hook into ikiwiki's cgi script. Each registered cgi hook is
|
||||
called in turn, and passed a CGI object. The hook should examine the
|
||||
parameters, and if it will handle this CGI request, output a page (including the http headers) and
|
||||
terminate the program.
|
||||
parameters, and if it will handle this CGI request, output a page
|
||||
(including the http headers) and terminate the program.
|
||||
|
||||
Note that cgi hooks are called as early as possible, before any ikiwiki
|
||||
state is loaded, and with no session information.
|
||||
|
||||
### auth
|
||||
|
||||
|
|
|
@ -121,7 +121,6 @@ sub main () { #{{{
|
|||
gen_wrapper();
|
||||
}
|
||||
elsif ($config{cgi}) {
|
||||
loadindex();
|
||||
require IkiWiki::CGI;
|
||||
cgi();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue