public static function cloneImportedDB($store_data) { fn_set_progress('title', __('store_import.cloning_database')); fn_define('DB_MAX_ROW_SIZE', 10000); fn_define('DB_ROWS_PER_PASS', 40); General::connectToImportedDB($store_data); $tables = General::getTables($store_data['db_name'], $store_data['table_prefix']); $excluded_tables = array($store_data['table_prefix'] . 'logs', $store_data['table_prefix'] . 'sessions', $store_data['table_prefix'] . 'stored_sessions', $store_data['table_prefix'] . 'user_session_products', $store_data['table_prefix'] . 'stat_browsers', $store_data['table_prefix'] . 'stat_ips', $store_data['table_prefix'] . 'stat_languages', $store_data['table_prefix'] . 'stat_product_search', $store_data['table_prefix'] . 'stat_requests', $store_data['table_prefix'] . 'stat_search_engines', $store_data['table_prefix'] . 'stat_search_phrases', $store_data['table_prefix'] . 'stat_sessions', $store_data['table_prefix'] . 'stat_banners_log'); $tables = array_diff($tables, $excluded_tables); $change_table_prefixes = array('from' => $store_data['table_prefix'], 'to' => self::formatPrefix()); db_export_to_file(Registry::get('config.dir.database') . 'export.sql', $tables, true, true, false, true, true, $change_table_prefixes); General::connectToOriginalDB(); self::_createExcludedTables($change_table_prefixes['to']); return db_import_sql_file(Registry::get('config.dir.database') . 'export.sql', 16384, true, true, false, false, false, true); }