| @@ 3483-3493 (lines=11) @@ | ||
| 3480 | } |
|
| 3481 | //now, just verify they didn't pass anything wack |
|
| 3482 | foreach ($query_params as $query_key => $query_value) { |
|
| 3483 | if (! in_array($query_key, $this->_allowed_query_params, true)) { |
|
| 3484 | throw new EE_Error( |
|
| 3485 | sprintf( |
|
| 3486 | __( |
|
| 3487 | "You passed %s as a query parameter to %s, which is illegal! The allowed query parameters are %s", |
|
| 3488 | 'event_espresso' |
|
| 3489 | ), |
|
| 3490 | $query_key, |
|
| 3491 | get_class($this), |
|
| 3492 | // print_r( $this->_allowed_query_params, TRUE ) |
|
| 3493 | implode(',', $this->_allowed_query_params) |
|
| 3494 | ) |
|
| 3495 | ); |
|
| 3496 | } |
|
| @@ 4262-4273 (lines=12) @@ | ||
| 4259 | if (! in_array($operator, $this->_in_style_operators) && ! is_array($value)) { |
|
| 4260 | return $operator . SP . $this->_wpdb_prepare_using_field($value, $field_obj); |
|
| 4261 | } |
|
| 4262 | if (in_array($operator, $this->_in_style_operators) && ! is_array($value)) { |
|
| 4263 | throw new EE_Error( |
|
| 4264 | sprintf( |
|
| 4265 | __( |
|
| 4266 | "Operator '%s' must be used with an array of values, eg 'Registration.REG_ID' => array('%s',array(1,2,3))", |
|
| 4267 | 'event_espresso' |
|
| 4268 | ), |
|
| 4269 | $operator, |
|
| 4270 | $operator |
|
| 4271 | ) |
|
| 4272 | ); |
|
| 4273 | } |
|
| 4274 | if (! in_array($operator, $this->_in_style_operators) && is_array($value)) { |
|
| 4275 | throw new EE_Error( |
|
| 4276 | sprintf( |
|
| @@ 4274-4285 (lines=12) @@ | ||
| 4271 | ) |
|
| 4272 | ); |
|
| 4273 | } |
|
| 4274 | if (! in_array($operator, $this->_in_style_operators) && is_array($value)) { |
|
| 4275 | throw new EE_Error( |
|
| 4276 | sprintf( |
|
| 4277 | __( |
|
| 4278 | "Operator '%s' must be used with a single value, not an array. Eg 'Registration.REG_ID => array('%s',23))", |
|
| 4279 | 'event_espresso' |
|
| 4280 | ), |
|
| 4281 | $operator, |
|
| 4282 | $operator |
|
| 4283 | ) |
|
| 4284 | ); |
|
| 4285 | } |
|
| 4286 | throw new EE_Error( |
|
| 4287 | sprintf( |
|
| 4288 | __( |
|
| @@ 4374-4376 (lines=3) @@ | ||
| 4371 | return $wpdb->prepare($field_obj->get_wpdb_data_type(), |
|
| 4372 | $this->_prepare_value_for_use_in_db($value, $field_obj)); |
|
| 4373 | } //$field_obj should really just be a data type |
|
| 4374 | if (! in_array($field_obj, $this->_valid_wpdb_data_types)) { |
|
| 4375 | throw new EE_Error( |
|
| 4376 | sprintf( |
|
| 4377 | __("%s is not a valid wpdb datatype. Valid ones are %s", "event_espresso"), |
|
| 4378 | $field_obj, implode(",", $this->_valid_wpdb_data_types) |
|
| 4379 | ) |
|