<?php
 class vB_dB_MYSQL_Assertor extends vB_dB_Assertor { protected static $db_type = 'MYSQL'; protected function __construct(&$dbconfig, &$config) { parent::__construct($dbconfig, $config); self::$dbSlave = (!empty($dbconfig['SlaveServer']['servername'])) AND (!empty($dbconfig['SlaveServer']['port'])) AND (!empty($dbconfig['SlaveServer']['username'])); } protected function load_database(&$dbconfig, &$config) { $db = new vB_Db_Mysql_Connection($dbconfig, $config); self::$db = $db; if (!$db->isExplainEmpty()) { $db->timer_start('Including Functions.php'); require_once(DIR . '/includes/functions.php'); $db->timer_stop(false); } else { require_once(DIR . '/includes/functions.php'); } $db->connect( $dbconfig['Database']['dbname'], $dbconfig['MasterServer']['servername'], (isset($dbconfig['MasterServer']['port']) ? $dbconfig['MasterServer']['port'] : null) , $dbconfig['MasterServer']['username'], $dbconfig['MasterServer']['password'], $dbconfig['MasterServer']['usepconnect'], $dbconfig['SlaveServer']['servername'], (isset($dbconfig['SlaveServer']['port']) ? $dbconfig['SlaveServer']['port'] : null) , $dbconfig['SlaveServer']['username'], $dbconfig['SlaveServer']['password'], $dbconfig['SlaveServer']['usepconnect'], (isset($dbconfig['Mysqli']['ini_file']) ? $dbconfig['Mysqli']['ini_file'] : ''), (isset($dbconfig['Mysqli']['charset']) ? $dbconfig['Mysqli']['charset'] : '') ); $db->force_sql_mode(''); if (defined('DEMO_MODE') AND DEMO_MODE AND function_exists('vbulletin_demo_init_db')) { vbulletin_demo_init_db(); } return $db; } } 