getApplication(); // Check for request forgeries. JSession::checkToken() or $app->sendJsonResponse(new Exception(JText::_('JINVALID_TOKEN'), 403)); // Get the setup model. $model = new InstallationModelSetup; // Check the form $model->checkForm('site'); // Redirect to the page. $r = new stdClass; $r->view = 'database'; $app->sendJsonResponse($r); } }