Skip to content

Commit 149e136

Browse files
committed
wip
1 parent 8d0e8c4 commit 149e136

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

packages/sqlite-database-integration/wp-includes/sqlite/db.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
require_once __DIR__ . '/../database/version.php';
1313

1414
// Require the constants file.
15-
require_once dirname( __DIR__, 2 ) . '/constants.php';
15+
require_once __DIR__ . '/../../constants.php';
1616

1717
// Bail early if DB_ENGINE is not defined as sqlite.
1818
if ( ! defined( 'DB_ENGINE' ) || 'sqlite' !== DB_ENGINE ) {
@@ -48,7 +48,7 @@
4848
}
4949

5050
if ( defined( 'WP_SQLITE_AST_DRIVER' ) && WP_SQLITE_AST_DRIVER ) {
51-
require_once __DIR__ . '/../../wp-pdo-mysql-on-sqlite.php';
51+
require_once __DIR__ . '/../database/load.php';
5252
} else {
5353
require_once __DIR__ . '/php-polyfills.php';
5454
require_once __DIR__ . '/class-wp-sqlite-lexer.php';
@@ -81,13 +81,13 @@
8181
* that are present in the GitHub repository
8282
* but not the plugin published on WordPress.org.
8383
*/
84-
$crosscheck_tests_file_path = dirname( __DIR__, 2 ) . '/tests/class-wp-sqlite-crosscheck-db.php';
84+
$crosscheck_tests_file_path = __DIR__ . '/class-wp-sqlite-crosscheck-db.php';
8585
if ( defined( 'SQLITE_DEBUG_CROSSCHECK' ) && SQLITE_DEBUG_CROSSCHECK && file_exists( $crosscheck_tests_file_path ) ) {
8686
require_once $crosscheck_tests_file_path;
8787
$GLOBALS['wpdb'] = new WP_SQLite_Crosscheck_DB( $db_name );
8888
} else {
8989
$GLOBALS['wpdb'] = new WP_SQLite_DB( $db_name );
9090

9191
// Boot the Query Monitor plugin if it is active.
92-
require_once dirname( __DIR__, 2 ) . '/integrations/query-monitor/boot.php';
92+
require_once __DIR__ . '/../../integrations/query-monitor/boot.php';
9393
}

wp-setup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ EOF
5656
# 4. Add "db.php" to the "wp-content" directory.
5757
echo "Adding 'db.php' to the 'wp-content' directory..."
5858
rm -f "$WP_DIR"/src/wp-content/db.php
59-
cp "$DIR"/db.copy "$WP_DIR"/src/wp-content/db.php
60-
sed -i.bak "s#'{SQLITE_IMPLEMENTATION_FOLDER_PATH}'#__DIR__.'/plugins/sqlite-database-integration'#g" "$WP_DIR"/src/wp-content/db.php
61-
sed -i.bak "s#{SQLITE_PLUGIN}#$WP_DIR/src/wp-content/plugins/sqlite-database-integration/load.php#g" "$WP_DIR"/src/wp-content/db.php
59+
cp "$DIR"/packages/sqlite-database-integration/db.copy "$WP_DIR"/src/wp-content/db.php
60+
sed -i.bak "s#'{SQLITE_IMPLEMENTATION_FOLDER_PATH}'#__DIR__.'/plugins/sqlite-database-integration/packages/sqlite-database-integration'#g" "$WP_DIR"/src/wp-content/db.php
61+
sed -i.bak "s#{SQLITE_PLUGIN}#sqlite-database-integration/packages/sqlite-database-integration/load.php#g" "$WP_DIR"/src/wp-content/db.php
6262

6363
# 5. Rewrite helper class WpdbExposedMethodsForTesting to extend WP_SQLite_DB.
6464
echo "Rewriting helper class 'WpdbExposedMethodsForTesting' to extend WP_SQLite_DB..."

0 commit comments

Comments
 (0)