if (@ini_get('session.save_handler') == 'user') { @ini_set('session.save_handler', 'files'); } @session_start(); // Add slashes, as long as they aren't already being added. if (function_exists('get_magic_quotes_gpc') && @get_magic_quotes_gpc() != 0) { $_POST = stripslashes_recursive($_POST); } $config = new Configurator(); $config->lang_dir = BASEDIR . '/Languages'; try { $lng = new Lang(); $lng->loadLang($config->lang_dir); } catch (Exception $e) { ImportException::exception_handler($e); } $template = new Template($lng); global $import; $importer = new Importer($config, $lng, $template); $response = new HttpResponse(new ResponseHeader()); $template->setResponse($response); $import = new ImportManager($config, $importer, $template, new Cookie(), $response); try { $import->process(); } catch (Exception $e) { // Debug, remember to remove before PR echo '<br>' . $e->getMessage() . '<br>'; echo $e->getFile() . '<br>'; echo $e->getLine() . '<br>'; // If an error is not catched, it means it's fatal and the script should die. }