| @@ 2460-2462 (lines=3) @@ | ||
| 2457 | ||
| 2458 | if ( ! isset( $params->query ) || '' === trim( $params->query ) ) { |
|
| 2459 | pods_error( __( 'Invalid field request', 'pods' ), PodsInit::$admin ); |
|
| 2460 | } elseif ( empty( $pod ) || empty( $field ) || (int) $pod['id'] !== (int) $field['pod_id'] || ! isset( $pod['fields'][ $field['name'] ] ) ) { |
|
| 2461 | pods_error( __( 'Invalid field request', 'pods' ), PodsInit::$admin ); |
|
| 2462 | } elseif ( 'pick' !== $field['type'] || empty( $field['table_info'] ) ) { |
|
| 2463 | pods_error( __( 'Invalid field', 'pods' ), PodsInit::$admin ); |
|
| 2464 | } elseif ( 'single' === pods_v( static::$type . '_format_type', $field ) && 'autocomplete' === pods_v( static::$type . '_format_single', $field ) ) { |
|
| 2465 | pods_error( __( 'Invalid field', 'pods' ), PodsInit::$admin ); |
|
| @@ 992-994 (lines=3) @@ | ||
| 989 | $pod = self::$api->load_pod( array( 'id' => (int) $params->pod ) ); |
|
| 990 | $field = self::$api->load_field( array( 'id' => (int) $params->field ) ); |
|
| 991 | ||
| 992 | if ( empty( $pod ) || empty( $field ) || (int) $pod['id'] !== (int) $field['pod_id'] || ! isset( $pod['fields'][ $field['name'] ] ) ) { |
|
| 993 | pods_error( __( 'Invalid field request', 'pods' ), PodsInit::$admin ); |
|
| 994 | } |
|
| 995 | ||
| 996 | if ( ! in_array( $field['type'], PodsForm::file_field_types(), true ) ) { |
|
| 997 | pods_error( __( 'Invalid field', 'pods' ), PodsInit::$admin ); |
|