PluginProbe
bbPress / 2.6.17
bbPress v2.6.17
2.6.17 trunk 2.0 2.0-beta-1 2.0-beta-2b 2.0-beta-3 2.0-beta-3b 2.0-rc-2 2.0-rc-3 2.0-rc-4 2.0-rc-5 2.0.1 2.0.2 2.0.3 2.1 2.1-beta-1 2.1-rc1 2.1-rc2 2.1-rc3 2.1-rc4 2.1.1 2.1.2 2.1.3 2.2 2.2.1 All 72 releases
bbpress / includes / admin / classes / class-bbp-converter-db.php

class-bbp-converter-db.php in bbPress 2.6.17, at includes/admin/classes/class-bbp-converter-db.php

58 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * bbPress Converter Database
5 *
6 * @package bbPress
7 * @subpackage Administration
8 */
9
10 // Exit if accessed directly
11 defined( 'ABSPATH' ) || exit;
12
13 if ( ! class_exists( 'BBP_Converter_DB' ) && class_exists( 'wpdb' ) ) :
14 /**
15 * bbPress Converter Database Access Abstraction Object
16 *
17 * @since 2.6.0 bbPress (r6784)
18 */
19 class BBP_Converter_DB extends wpdb {
20
21 /**
22 * Sets up the credentials used to connect to the database server, but does
23 * not actually connect to the database on construct.
24 *
25 * @since 2.6.0 bbPress (r6784)
26 *
27 * @param string $dbuser MySQL database user
28 * @param string $dbpassword MySQL database password
29 * @param string $dbname MySQL database name
30 * @param string $dbhost MySQL database host
31 */
32 public function __construct( $dbuser, $dbpassword, $dbname, $dbhost ) {
33
34 if ( WP_DEBUG && WP_DEBUG_DISPLAY ) {
35 $this->show_errors();
36 }
37
38 // Use ext/mysqli if it exists unless WP_USE_EXT_MYSQL is defined as true
39 if ( function_exists( 'mysqli_connect' ) ) {
40 $this->use_mysqli = true;
41
42 if ( defined( 'WP_USE_EXT_MYSQL' ) ) {
43 $this->use_mysqli = ! WP_USE_EXT_MYSQL;
44 }
45 }
46
47 // Setup credentials
48 $this->dbuser = $dbuser;
49 $this->dbpassword = $dbpassword;
50 $this->dbname = $dbname;
51 $this->dbhost = $dbhost;
52
53 // Normally wpdb would try to connect here, but we don't want to do that
54 // until we are good and ready, so instead we do nothing.
55 }
56 }
57 endif;
58