Ticket #27703: 27703.2.diff
File 27703.2.diff, 853 bytes (added by , 10 years ago) |
---|
-
src/wp-includes/wp-db.php
2137 2137 * 2138 2138 * @since 2.7.0 2139 2139 * 2140 * @param bool $full Optional. Flag to provide the full version string, default false. Available since 3.9.0. 2141 * 2140 2142 * @return false|string false on failure, version number on success 2141 2143 */ 2142 function db_version( ) {2144 function db_version( $full = false ) { 2143 2145 if ( $this->use_mysqli ) { 2144 2146 $server_info = mysqli_get_server_info( $this->dbh ); 2145 2147 } else { 2146 2148 $server_info = mysql_get_server_info( $this->dbh ); 2147 2149 } 2148 return preg_replace( '/[^0-9.].*/', '', $server_info ); 2150 2151 if ( $full ) { 2152 return $server_info; 2153 } else { 2154 return preg_replace( '/[^0-9.].*/', '', $server_info ); 2155 } 2149 2156 } 2150 2157 }