Skip to content

Commit

Permalink
Fix the ajax skip option, add FIXME that page changes can occur durin…
Browse files Browse the repository at this point in the history
…g saves
  • Loading branch information
michitux committed Mar 31, 2013
1 parent e4d6c6a commit b57a8d4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions action.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ function handle_read(Doku_Event $event, $param) {
if (isset($stack[$id])) return;

// Don't change the page when the user is currently changing the page content or the page is locked by another user
// FIXME: this doesn't work, most probably because $ACT is an array or not yet set
if ((isset($ACT) && (in_array($ACT, array('save', 'preview', 'recover', 'revert'))))
|| checklock($id) !== false) return;

Expand Down Expand Up @@ -168,9 +169,9 @@ public function handle_ajax_call(Doku_Event $event, $params) {
$helper = $this->loadHelper('pagemove', false);
$opts = $helper->get_namespace_move_opts();
$id = cleanID((string)$_POST['id']);
$skip = (int)$_POST['skip'];
$skip = (string)$_POST['skip'];
if ($opts !== false) {
if ($skip) {
if ($skip == 'true') {
$helper->skip_namespace_move_item();
}
$remaining = $helper->continue_namespace_move();
Expand Down

0 comments on commit b57a8d4

Please sign in to comment.