|
@@ 7839-7840 (lines=2) @@
|
| 7836 |
|
if ( in_array( $type, PodsForm::file_field_types() ) || 'media' == $pick_object ) { |
| 7837 |
|
$where = "`guid` = '" . pods_sanitize( $pick_value ) . "'"; |
| 7838 |
|
|
| 7839 |
|
if ( 0 < pods_absint( $pick_value ) && false !== $numeric_mode ) |
| 7840 |
|
$where = "`ID` = " . pods_absint( $pick_value ); |
| 7841 |
|
|
| 7842 |
|
$result = pods_query( "SELECT `ID` AS `id` FROM `{$wpdb->posts}` WHERE `post_type` = 'attachment' AND {$where} ORDER BY `ID`", $this ); |
| 7843 |
|
|
|
@@ 7864-7865 (lines=2) @@
|
| 7861 |
|
if ( in_array( 'taxonomy', array( $pick_object, $related_pod[ 'type' ] ) ) ) { |
| 7862 |
|
$where = "`t`.`name` = '" . pods_sanitize( $pick_value ) . "'"; |
| 7863 |
|
|
| 7864 |
|
if ( 0 < pods_absint( $pick_value ) && false !== $numeric_mode ) |
| 7865 |
|
$where = "`tt`.`term_id` = " . pods_absint( $pick_value ); |
| 7866 |
|
|
| 7867 |
|
$result = pods_query( "SELECT `t`.`term_id` AS `id` FROM `{$wpdb->term_taxonomy}` AS `tt` LEFT JOIN `{$wpdb->terms}` AS `t` ON `t`.`term_id` = `tt`.`term_id` WHERE `taxonomy` = '{$pick_val}' AND {$where} ORDER BY `t`.`term_id`", $this ); |
| 7868 |
|
|
|
@@ 7875-7876 (lines=2) @@
|
| 7872 |
|
elseif ( in_array( 'post_type', array( $pick_object, $related_pod[ 'type' ] ) ) || in_array( 'media', array( $pick_object, $related_pod[ 'type' ] ) ) ) { |
| 7873 |
|
$where = "`post_title` = '" . pods_sanitize( $pick_value ) . "'"; |
| 7874 |
|
|
| 7875 |
|
if ( 0 < pods_absint( $pick_value ) && false !== $numeric_mode ) |
| 7876 |
|
$where = "`ID` = " . pods_absint( $pick_value ); |
| 7877 |
|
|
| 7878 |
|
$result = pods_query( "SELECT `ID` AS `id` FROM `{$wpdb->posts}` WHERE `post_type` = '{$pick_val}' AND {$where} ORDER BY `ID`", $this ); |
| 7879 |
|
|
|
@@ 7886-7887 (lines=2) @@
|
| 7883 |
|
elseif ( in_array( 'user', array( $pick_object, $related_pod[ 'type' ] ) ) ) { |
| 7884 |
|
$where = "`user_login` = '" . pods_sanitize( $pick_value ) . "'"; |
| 7885 |
|
|
| 7886 |
|
if ( 0 < pods_absint( $pick_value ) && false !== $numeric_mode ) |
| 7887 |
|
$where = "`ID` = " . pods_absint( $pick_value ); |
| 7888 |
|
|
| 7889 |
|
$result = pods_query( "SELECT `ID` AS `id` FROM `{$wpdb->users}` WHERE {$where} ORDER BY `ID`", $this ); |
| 7890 |
|
|