private function updateWizardState() { $context = $this->context; $upload_status = array(1 => "File is too large!", 2 => "File is too large!", 3 => "Partial upload..", 4 => "No file was uploaded!", 6 => "Internal error (tmp folder is missing)", 7 => "Can't write file", 8 => "An extension stopped the upload process!"); $post = $context->getRequest()->getParameterHolder()->getAll(); $url = $context->getRequest()->getUri(); if (!isset($post["step"])) { $step = $post["last"]; } else { $step = $post["step"]; } $status = XmlParser::updateSession($step); if ($status === true || $status === 0) { afWizard::takeStep(); $result = array('success' => true, 'message' => false, 'redirect' => $url, 'load' => 'center'); } else { $result = array('success' => false, 'message' => "A file upload error has been detected: " . $upload_status[$status] . "!"); } echo json_encode($result); exit; }