Changeset 9703
- Timestamp:
- 04/06/2015 04:09:12 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-xprofile/classes/class-bp-xprofile-query.php
r9486 r9703 180 180 */ 181 181 public function get_cast_for_type( $type = '' ) { 182 if ( empty( $type ) ) 182 if ( empty( $type ) ) { 183 183 return 'CHAR'; 184 } 184 185 185 186 $meta_type = strtoupper( $type ); 186 187 187 if ( ! preg_match( '/^(?:BINARY|CHAR|DATE|DATETIME|SIGNED|UNSIGNED|TIME|NUMERIC(?:\(\d+(?:,\s?\d+)?\))?|DECIMAL(?:\(\d+(?:,\s?\d+)?\))?)$/', $meta_type ) ) 188 if ( ! preg_match( '/^(?:BINARY|CHAR|DATE|DATETIME|SIGNED|UNSIGNED|TIME|NUMERIC(?:\(\d+(?:,\s?\d+)?\))?|DECIMAL(?:\(\d+(?:,\s?\d+)?\))?)$/', $meta_type ) ) { 188 189 return 'CHAR'; 189 190 if ( 'NUMERIC' == $meta_type ) 190 } 191 192 if ( 'NUMERIC' === $meta_type ) { 191 193 $meta_type = 'SIGNED'; 194 } 192 195 193 196 return $meta_type; … … 323 326 * } 324 327 */ 325 public function get_sql( $primary_table, $primary_id_column, $context = null ) { 326 global $wpdb; 328 public function get_sql( $primary_table, $primary_id_column ) { 327 329 328 330 $this->primary_table = $primary_table;
Note: See TracChangeset
for help on using the changeset viewer.