WordPress.org

Make WordPress Core

Ticket #19324: 19324.diff

File 19324.diff, 985 bytes (added by Otto42, 6 years ago)

patch to add DB_NEW_LINK and DB_CLIENT_FLAGS defines

  • wp-includes/wp-db.php

     
    10331033        function db_connect() {
    10341034
    10351035                $this->is_mysql = true;
     1036               
     1037                if ( defined( 'DB_NEW_LINK' ) )
     1038                        $this->newlink = DB_NEW_LINK;
     1039                else
     1040                        $this->newlink = true;
    10361041
     1042                if ( defined( 'DB_CLIENT_FLAGS' ) )
     1043                        $this->client_flags = DB_CLIENT_FLAGS;
     1044                else
     1045                        $this->client_flags = 0;
     1046                       
    10371047                if ( WP_DEBUG ) {
    1038                         $this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, true );
     1048                        $this->dbh = mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $this->newlink, $this->client_flags );
    10391049                } else {
    1040                         $this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, true );
     1050                        $this->dbh = @mysql_connect( $this->dbhost, $this->dbuser, $this->dbpassword, $this->newlink, $this->client_flags );
    10411051                }
    10421052
    10431053                if ( !$this->dbh ) {