- # prevent deadlock with post-commit hook
- IkiWiki::unlockwiki();
- IkiWiki::rcs_commit($pagesources{$page}, "poll vote ($choice)",
- IkiWiki::rcs_prepedit($pagesources{$page}),
- $session->param("name"), $ENV{REMOTE_ADDR});
- }
- else {
- require IkiWiki::Render;
- IkiWiki::refresh();
- IkiWiki::saveindex();
+ IkiWiki::disable_commit_hook();
+ IkiWiki::rcs_commit(
+ file => $pagesources{$page},
+ message => "poll vote ($choice)",
+ token => IkiWiki::rcs_prepedit($pagesources{$page}),
+ session => $session,
+ );
+ IkiWiki::enable_commit_hook();
+ IkiWiki::rcs_update();