Skip to:
Content

BuddyPress.org

Changeset 9703


Ignore:
Timestamp:
04/06/2015 04:09:12 PM (11 years ago)
Author:
johnjamesjacoby
Message:

XProfile: Quick clean-up to BP_XProfile_Query

  • Remove unused $wpdb global reference
  • Remove unused $context parameter in get_sql() method
  • Add brackets to conditionals

See #6346.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-query.php

    r9486 r9703  
    180180         */
    181181        public function get_cast_for_type( $type = '' ) {
    182                 if ( empty( $type ) )
     182                if ( empty( $type ) ) {
    183183                        return 'CHAR';
     184                }
    184185
    185186                $meta_type = strtoupper( $type );
    186187
    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 ) ) {
    188189                        return 'CHAR';
    189 
    190                 if ( 'NUMERIC' == $meta_type )
     190                }
     191
     192                if ( 'NUMERIC' === $meta_type ) {
    191193                        $meta_type = 'SIGNED';
     194                }
    192195
    193196                return $meta_type;
     
    323326         * }
    324327         */
    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 ) {
    327329
    328330                $this->primary_table     = $primary_table;
Note: See TracChangeset for help on using the changeset viewer.