PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.5.0
Forumax – AI Powered Advanced Community Forum Plugin v2.5.0
2.5.0 2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 2.0.0 All 30 releases
bbp-core / lib / bbpress / includes / admin / classes / class-bbp-converter-db.php

class-bbp-converter-db.php in Forumax – AI Powered Advanced Community Forum Plugin 2.5.0, at lib/bbpress/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