| @@ 3497-3507 (lines=11) @@ | ||
| 3494 | } |
|
| 3495 | //now, just verify they didn't pass anything wack |
|
| 3496 | foreach ($query_params as $query_key => $query_value) { |
|
| 3497 | if (! in_array($query_key, $this->_allowed_query_params, true)) { |
|
| 3498 | throw new EE_Error( |
|
| 3499 | sprintf( |
|
| 3500 | __( |
|
| 3501 | "You passed %s as a query parameter to %s, which is illegal! The allowed query parameters are %s", |
|
| 3502 | 'event_espresso' |
|
| 3503 | ), |
|
| 3504 | $query_key, |
|
| 3505 | get_class($this), |
|
| 3506 | // print_r( $this->_allowed_query_params, TRUE ) |
|
| 3507 | implode(',', $this->_allowed_query_params) |
|
| 3508 | ) |
|
| 3509 | ); |
|
| 3510 | } |
|
| @@ 4276-4287 (lines=12) @@ | ||
| 4273 | if (! in_array($operator, $this->_in_style_operators) && ! is_array($value)) { |
|
| 4274 | return $operator . SP . $this->_wpdb_prepare_using_field($value, $field_obj); |
|
| 4275 | } |
|
| 4276 | if (in_array($operator, $this->_in_style_operators) && ! is_array($value)) { |
|
| 4277 | throw new EE_Error( |
|
| 4278 | sprintf( |
|
| 4279 | __( |
|
| 4280 | "Operator '%s' must be used with an array of values, eg 'Registration.REG_ID' => array('%s',array(1,2,3))", |
|
| 4281 | 'event_espresso' |
|
| 4282 | ), |
|
| 4283 | $operator, |
|
| 4284 | $operator |
|
| 4285 | ) |
|
| 4286 | ); |
|
| 4287 | } |
|
| 4288 | if (! in_array($operator, $this->_in_style_operators) && is_array($value)) { |
|
| 4289 | throw new EE_Error( |
|
| 4290 | sprintf( |
|
| @@ 4288-4299 (lines=12) @@ | ||
| 4285 | ) |
|
| 4286 | ); |
|
| 4287 | } |
|
| 4288 | if (! in_array($operator, $this->_in_style_operators) && is_array($value)) { |
|
| 4289 | throw new EE_Error( |
|
| 4290 | sprintf( |
|
| 4291 | __( |
|
| 4292 | "Operator '%s' must be used with a single value, not an array. Eg 'Registration.REG_ID => array('%s',23))", |
|
| 4293 | 'event_espresso' |
|
| 4294 | ), |
|
| 4295 | $operator, |
|
| 4296 | $operator |
|
| 4297 | ) |
|
| 4298 | ); |
|
| 4299 | } |
|
| 4300 | throw new EE_Error( |
|
| 4301 | sprintf( |
|
| 4302 | __( |
|
| @@ 4388-4390 (lines=3) @@ | ||
| 4385 | return $wpdb->prepare($field_obj->get_wpdb_data_type(), |
|
| 4386 | $this->_prepare_value_for_use_in_db($value, $field_obj)); |
|
| 4387 | } //$field_obj should really just be a data type |
|
| 4388 | if (! in_array($field_obj, $this->_valid_wpdb_data_types)) { |
|
| 4389 | throw new EE_Error( |
|
| 4390 | sprintf( |
|
| 4391 | __("%s is not a valid wpdb datatype. Valid ones are %s", "event_espresso"), |
|
| 4392 | $field_obj, implode(",", $this->_valid_wpdb_data_types) |
|
| 4393 | ) |
|