PluginProbe
SQLite Database Integration / trunk
SQLite Database Integration vtrunk
3.0.2 3.0.1 trunk 2.1.13 2.1.14 2.1.15 2.1.16 2.2.0 2.2.1 2.2.10 2.2.11 2.2.12 2.2.13 2.2.14 2.2.15 2.2.16 2.2.17 2.2.18 2.2.19 2.2.2 2.2.20 2.2.21 2.2.22 2.2.23 2.2.3 All 32 releases
← All changes | constants.php +4 -21 2.2.3trunk View file →
@@ -1,10 +1,7 @@
1 1 <?php
2 2 /**
3 3 * Define constants for the SQLite implementation.
4 - *
5 - * @since 1.0.0
6 - * @package wp-sqlite-integration
7 4 */
8 5
9 6 // Temporary - This will be in wp-config.php once SQLite is merged in Core.
10 7 if ( ! defined( 'DB_ENGINE' ) ) {
@@ -9,11 +6,8 @@
9 6 // Temporary - This will be in wp-config.php once SQLite is merged in Core.
10 7 if ( ! defined( 'DB_ENGINE' ) ) {
11 8 if ( defined( 'SQLITE_DB_DROPIN_VERSION' ) ) {
12 9 define( 'DB_ENGINE', 'sqlite' );
13 - } elseif ( defined( 'DATABASE_ENGINE' ) ) {
14 - // backwards compatibility with previous versions of the plugin.
15 - define( 'DB_ENGINE', DATABASE_ENGINE );
16 10 } else {
17 11 define( 'DB_ENGINE', 'mysql' );
18 12 }
19 13 }
@@ -28,8 +22,10 @@
28 22
29 23 /**
30 24 * FQDBDIR is a directory where the sqlite database file is placed.
31 25 * If DB_DIR is defined, it is used as FQDBDIR.
26 + *
27 + * @deprecated 3.0.0 Define DB_DIR instead of overriding FQDBDIR.
32 28 */
33 29 if ( ! defined( 'FQDBDIR' ) ) {
34 30 if ( defined( 'DB_DIR' ) ) {
35 31 define( 'FQDBDIR', trailingslashit( DB_DIR ) );
@@ -42,8 +38,10 @@
42 38
43 39 /**
44 40 * FQDB is a database file name. If DB_FILE is defined, it is used
45 41 * as FQDB.
42 + *
43 + * @deprecated 3.0.0 Define DB_DIR and DB_FILE instead of overriding FQDB.
46 44 */
47 45 if ( ! defined( 'FQDB' ) ) {
48 46 if ( defined( 'DB_FILE' ) ) {
49 47 define( 'FQDB', FQDBDIR . DB_FILE );
@@ -49,20 +47,5 @@
49 47 define( 'FQDB', FQDBDIR . DB_FILE );
50 48 } else {
51 49 define( 'FQDB', FQDBDIR . '.ht.sqlite' );
52 50 }
53 -}
54 -
55 -/**
56 - * The DB_NAME constant is required by the SQLite driver.
57 - *
58 - * When DB_NAME is not defined, let's use a default value that corresponds to
59 - * the default value of the constant in "wp-config-sample.php" and in Studio.
60 - */
61 -if ( ! defined( 'DB_NAME' ) ) {
62 - define( 'DB_NAME', 'database_name_here' );
63 -}
64 -
65 -// Allow enabling the SQLite AST driver via environment variable.
66 -if ( ! defined( 'WP_SQLITE_AST_DRIVER' ) && isset( $_ENV['WP_SQLITE_AST_DRIVER'] ) && 'true' === $_ENV['WP_SQLITE_AST_DRIVER'] ) {
67 - define( 'WP_SQLITE_AST_DRIVER', true );
68 51 }