File tree Expand file tree Collapse file tree
sqlite-database-integration Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 * Load the "SQLITE_DRIVER_VERSION" constant.
1717 * This constant needs to be updated on plugin release!
1818 */
19- require_once __DIR__ . '/version.php ' ;
19+ require_once __DIR__ . '/../../ version.php ' ;
2020
2121define ( 'SQLITE_MAIN_FILE ' , __FILE__ );
2222
23- require_once __DIR__ . '/php-polyfills.php ' ;
23+ require_once __DIR__ . '/../../ php-polyfills.php ' ;
2424require_once __DIR__ . '/admin-page.php ' ;
2525require_once __DIR__ . '/activate.php ' ;
2626require_once __DIR__ . '/deactivate.php ' ;
Original file line number Diff line number Diff line change 99/**
1010 * Load the "SQLITE_DRIVER_VERSION" constant.
1111 */
12- require_once dirname ( __DIR__ , 2 ) . '/version.php ' ;
12+ require_once dirname ( __DIR__ , 4 ) . '/version.php ' ;
1313
1414// Require the constants file.
1515require_once dirname ( __DIR__ , 2 ) . '/constants.php ' ;
4848}
4949
5050if ( defined ( 'WP_SQLITE_AST_DRIVER ' ) && WP_SQLITE_AST_DRIVER ) {
51- require_once __DIR__ . '/../.. /wp-pdo-mysql-on-sqlite.php ' ;
51+ require_once dirname ( __DIR__ , 4 ) . '/wp-pdo-mysql-on-sqlite.php ' ;
5252} else {
5353 require_once __DIR__ . '/class-wp-sqlite-lexer.php ' ;
5454 require_once __DIR__ . '/class-wp-sqlite-query-rewriter.php ' ;
8080 * that are present in the GitHub repository
8181 * but not the plugin published on WordPress.org.
8282 */
83- $ crosscheck_tests_file_path = dirname ( __DIR__ , 2 ) . '/tests /class-wp-sqlite-crosscheck-db.php ' ;
83+ $ crosscheck_tests_file_path = __DIR__ . '/class-wp-sqlite-crosscheck-db.php ' ;
8484if ( defined ( 'SQLITE_DEBUG_CROSSCHECK ' ) && SQLITE_DEBUG_CROSSCHECK && file_exists ( $ crosscheck_tests_file_path ) ) {
8585 require_once $ crosscheck_tests_file_path ;
8686 $ GLOBALS ['wpdb ' ] = new WP_SQLite_Crosscheck_DB ( $ db_name );
Original file line number Diff line number Diff line change 11<?php
22
33require_once __DIR__ . '/wp-sqlite-schema.php ' ;
4- require_once __DIR__ . '/../load.php ' ;
4+ require_once __DIR__ . '/../src/ load.php ' ;
55
66// When on an older SQLite version, enable unsafe back compatibility.
77$ sqlite_version = ( new PDO ( 'sqlite::memory: ' ) )->query ( 'SELECT SQLITE_VERSION(); ' )->fetch ()[0 ];
Original file line number Diff line number Diff line change 5656# 4. Add "db.php" to the "wp-content" directory.
5757echo " Adding 'db.php' to the 'wp-content' directory..."
5858rm -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.
6464echo " Rewriting helper class 'WpdbExposedMethodsForTesting' to extend WP_SQLite_DB..."
You can’t perform that action at this time.
0 commit comments