| @@ -54,23 +54,8 @@ | ||
| 54 | 54 | require_once __DIR__ . '/class-wp-sqlite-pdo-user-defined-functions.php'; |
| 55 | 55 | require_once __DIR__ . '/class-wp-sqlite-db.php'; |
| 56 | 56 | require_once __DIR__ . '/install-functions.php'; |
| 57 | 57 | |
| 58 | -/** | |
| 59 | - * The DB_NAME constant is required by the new SQLite driver. | |
| 60 | - * | |
| 61 | - * There are some existing projects in which the DB_NAME constant is missing in | |
| 62 | - * wp-config.php. To enable easier early adoption and testing of the new SQLite | |
| 63 | - * driver, let's allow using a default database name when DB_NAME is not set. | |
| 64 | - * | |
| 65 | - * TODO: For version 3.0, enforce the DB_NAME constant and remove the fallback. | |
| 66 | - */ | |
| 67 | -if ( defined( 'DB_NAME' ) && '' !== DB_NAME ) { | |
| 68 | - $db_name = DB_NAME; | |
| 69 | -} else { | |
| 70 | - $db_name = apply_filters( 'wp_sqlite_default_db_name', 'database_name_here' ); | |
| 71 | -} | |
| 72 | - | |
| 73 | 58 | /* |
| 74 | 59 | * Debug: Cross-check with MySQL. |
| 75 | 60 | * This is for debugging purpose only and requires files |
| 76 | 61 | * that are present in the GitHub repository |
| @@ -78,11 +63,8 @@ | ||
| 78 | 63 | */ |
| 79 | 64 | $crosscheck_tests_file_path = dirname( __DIR__, 2 ) . '/tests/class-wp-sqlite-crosscheck-db.php'; |
| 80 | 65 | if ( defined( 'SQLITE_DEBUG_CROSSCHECK' ) && SQLITE_DEBUG_CROSSCHECK && file_exists( $crosscheck_tests_file_path ) ) { |
| 81 | 66 | require_once $crosscheck_tests_file_path; |
| 82 | - $GLOBALS['wpdb'] = new WP_SQLite_Crosscheck_DB( $db_name ); | |
| 67 | + $GLOBALS['wpdb'] = new WP_SQLite_Crosscheck_DB( DB_NAME ); | |
| 83 | 68 | } else { |
| 84 | - $GLOBALS['wpdb'] = new WP_SQLite_DB( $db_name ); | |
| 85 | - | |
| 86 | - // Boot the Query Monitor plugin if it is active. | |
| 87 | - require_once dirname( __DIR__, 2 ) . '/integrations/query-monitor/boot.php'; | |
| 69 | + $GLOBALS['wpdb'] = new WP_SQLite_DB( DB_NAME ); | |
| 88 | 70 | } |