| @@ 2788-2790 (lines=3) @@ | ||
| 2785 | 'minimum', |
|
| 2786 | 'none' |
|
| 2787 | ); |
|
| 2788 | if( ! in_array($use_default_where_conditions,$allowed_used_default_where_conditions_values)){ |
|
| 2789 | throw new EE_Error(sprintf(__("You passed an invalid value to the query parameter 'default_where_conditions' of '%s'. Allowed values are %s", "event_espresso"),$use_default_where_conditions,implode(", ",$allowed_used_default_where_conditions_values))); |
|
| 2790 | } |
|
| 2791 | if( in_array($use_default_where_conditions, array('all','this_model_only')) ){ |
|
| 2792 | $universal_query_params = $this->_get_default_where_conditions(); |
|
| 2793 | }elseif( in_array( $use_default_where_conditions, array( 'minimum' ) ) ) { |
|
| @@ 4522-4533 (lines=12) @@ | ||
| 4519 | */ |
|
| 4520 | static public function verify_is_valid_cap_context( $context ) { |
|
| 4521 | $valid_cap_contexts = EEM_Base::valid_cap_contexts(); |
|
| 4522 | if( in_array( $context, $valid_cap_contexts ) ) { |
|
| 4523 | return true; |
|
| 4524 | }else{ |
|
| 4525 | throw new EE_Error( |
|
| 4526 | sprintf( |
|
| 4527 | __( 'Context "%1$s" passed into model "%2$s" is not a valid context. They are: %3$s', 'event_espresso' ), |
|
| 4528 | $context, |
|
| 4529 | 'EEM_Base' , |
|
| 4530 | implode(',', $valid_cap_contexts ) |
|
| 4531 | ) |
|
| 4532 | ); |
|
| 4533 | } |
|
| 4534 | } |
|
| 4535 | ||
| 4536 | /** |
|
| @@ 643-653 (lines=11) @@ | ||
| 640 | // don't give up! you gotta... |
|
| 641 | try { |
|
| 642 | //does the file exist and can it be read ? |
|
| 643 | if ( ! $path ) { |
|
| 644 | // so sorry, can't find the file |
|
| 645 | throw new EE_Error ( |
|
| 646 | sprintf( |
|
| 647 | __( 'The %1$s file %2$s could not be located or is not readable due to file permissions. Please ensure that the following filepath(s) are correct: %3$s', 'event_espresso' ), |
|
| 648 | trim( $type, '.' ), |
|
| 649 | $class_name, |
|
| 650 | '<br />' . implode( ',<br />', $file_paths ) |
|
| 651 | ) |
|
| 652 | ); |
|
| 653 | } |
|
| 654 | // get the file |
|
| 655 | require_once( $path ); |
|
| 656 | // if the class isn't already declared somewhere |
|