]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/CGI.pm
* Avoid locking the wiki at all when handling some basic cgi stuff
[ikiwiki.git] / IkiWiki / CGI.pm
index 53237bcdb571c646b5d19d9403d1056cc58dfa8b..14861e398d5e04fa5f050fe3e7626df8f3c3a44d 100644 (file)
@@ -67,8 +67,6 @@ sub decode_form_utf8 ($) { #{{{
 sub cgi_recentchanges ($) { #{{{
        my $q=shift;
        
-       unlockwiki();
-
        # Optimisation: building recentchanges means calculating lots of
        # links. Memoizing htmllink speeds it up a lot (can't be memoized
        # during page builds as the return values may change, but they
@@ -715,6 +713,9 @@ sub cgi (;$$) { #{{{
        elsif ($do eq 'hyperestraier') {
                cgi_hyperestraier();
        }
+
+       # Need to lock the wiki before getting a session.
+       lockwiki();
        
        if (! $session) {
                CGI::Session->name("ikiwiki_session_".encode_utf8($config{wikiname}));