Changeset 24121 for trunk/wp-includes/wp-db.php
- Timestamp:
- 04/29/2013 12:31:56 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/wp-db.php
r24027 r24121 641 641 * @param string $collate The collation (optional) 642 642 */ 643 function set_charset( $dbh, $charset = null, $collate = null) {644 if ( ! isset($charset) )643 function set_charset( $dbh, $charset = null, $collate = null ) { 644 if ( ! isset( $charset ) ) 645 645 $charset = $this->charset; 646 if ( ! isset($collate) )646 if ( ! isset( $collate ) ) 647 647 $collate = $this->collate; 648 if ( $this->has_cap( 'collation' , $dbh ) && !empty( $charset ) ) {649 if ( function_exists( 'mysql_set_charset' ) && $this->has_cap( 'set_charset' , $dbh) ) {648 if ( $this->has_cap( 'collation' ) && ! empty( $charset ) ) { 649 if ( function_exists( 'mysql_set_charset' ) && $this->has_cap( 'set_charset' ) ) { 650 650 mysql_set_charset( $charset, $dbh ); 651 651 $this->real_escape = true; … … 1688 1688 1689 1689 /** 1690 * Determine if a database supports a particular feature 1690 * Determine if a database supports a particular feature. 1691 1691 * 1692 1692 * @since 2.7.0 1693 * @see 1694 * 1695 * @param string $db_cap the feature1693 * @see wpdb::db_version() 1694 * 1695 * @param string $db_cap The feature to check for. 1696 1696 * @return bool 1697 1697 */ … … 1701 1701 switch ( strtolower( $db_cap ) ) { 1702 1702 case 'collation' : // @since 2.5.0 1703 case 'group_concat' : // @since 2.7 1704 case 'subqueries' : // @since 2.7 1703 case 'group_concat' : // @since 2.7.0 1704 case 'subqueries' : // @since 2.7.0 1705 1705 return version_compare( $version, '4.1', '>=' ); 1706 1706 case 'set_charset' : 1707 return version_compare( $version, '5.0.7', '>=');1707 return version_compare( $version, '5.0.7', '>=' ); 1708 1708 }; 1709 1709
Note: See TracChangeset
for help on using the changeset viewer.