Changeset 1201
- Timestamp:
- 03/03/2008 11:40:26 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/bb-includes/db-mysqli.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bb-includes/db-mysqli.php
r989 r1201 34 34 $server->pass = constant('USER_BBDB_PASSWORD'); 35 35 $server->host = constant('USER_BBDB_HOST'); 36 $server->port = null; 37 $server->socket = null; 36 38 $server->charset = $this->user_charset; 37 39 } else { // just us … … 41 43 $server->pass = defined('BBDB_PASSWORD') ? constant('BBDB_PASSWORD') : false; 42 44 $server->host = defined('BBDB_HOST') ? constant('BBDB_HOST') : false; 45 $server->port = null; 46 $server->socket = null; 43 47 $server->charset = $this->charset; 44 48 } 45 49 46 50 // Set the port if it is specified in the host 47 if (strpos($server->host, ':') === false) { 48 $server->port = null; 49 } else { 51 if (strpos($server->host, ':') !== false) { 50 52 list($server->host, $server->port) = explode(':', $server->host); 53 // Make it a socket if it's not numeric 54 if (!is_numeric($server->port)) { 55 $server->socket = $server->port; 56 $server->port = null; 57 } 51 58 } 52 59 … … 58 65 $this->timer_start(); 59 66 60 $this->$dbhname = @mysqli_connect( $server->host, $server->user, $server->pass, null, $server->port );67 $this->$dbhname = @mysqli_connect( $server->host, $server->user, $server->pass, null, $server->port, $server->socket ); 61 68 62 69 if (!$this->$dbhname)
Note: See TracChangeset
for help on using the changeset viewer.