Changeset 24712 for trunk/wp-includes/wp-db.php
- Timestamp:
- 07/16/2013 02:07:53 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/wp-db.php
r24494 r24712 443 443 444 444 /** 445 * Whether to use mysql_real_escape_string446 *447 * @since 2.8.0448 * @access public449 * @var bool450 */451 var $real_escape = false;452 453 /**454 445 * Database Username 455 446 * … … 649 640 if ( function_exists( 'mysql_set_charset' ) && $this->has_cap( 'set_charset' ) ) { 650 641 mysql_set_charset( $charset, $dbh ); 651 $this->real_escape = true;652 642 } else { 653 643 $query = $this->prepare( 'SET NAMES %s', $charset ); … … 871 861 872 862 /** 873 * Real escape, using mysql_real_escape_string() or addslashes()863 * Real escape, using mysql_real_escape_string() 874 864 * 875 865 * @see mysql_real_escape_string() 876 * @see addslashes()877 866 * @since 2.8.0 878 867 * @access private … … 882 871 */ 883 872 function _real_escape( $string ) { 884 if ( $this->dbh && $this->real_escape ) 885 return mysql_real_escape_string( $string, $this->dbh ); 886 else 887 return addslashes( $string ); 873 return mysql_real_escape_string( $string, $this->dbh ); 888 874 } 889 875
Note: See TracChangeset
for help on using the changeset viewer.