Code Duplication    Length = 14-16 lines in 2 locations

classes/PodsAPI.php 2 locations

@@ 2725-2740 (lines=16) @@
2722
                }
2723
            }
2724
        }
2725
        elseif ( 0 < $sister_id ) {
2726
            update_post_meta( $sister_id, 'sister_id', $params->id );
2727
2728
            if ( true === $db && ( !pods_tableless() ) ) {
2729
                pods_query( "
2730
                        UPDATE `@wp_podsrel`
2731
                        SET `related_field_id` = %d
2732
                        WHERE `field_id` = %d
2733
                    ",
2734
                    array(
2735
                        $params->id,
2736
                        $sister_id
2737
                    )
2738
                );
2739
            }
2740
        }
2741
        elseif ( 0 < $old_sister_id ) {
2742
            delete_post_meta( $old_sister_id, 'sister_id' );
2743
@@ 2741-2754 (lines=14) @@
2738
                );
2739
            }
2740
        }
2741
        elseif ( 0 < $old_sister_id ) {
2742
            delete_post_meta( $old_sister_id, 'sister_id' );
2743
2744
            if ( true === $db && ( !pods_tableless() ) ) {
2745
                pods_query( "
2746
                        UPDATE `@wp_podsrel`
2747
                        SET `related_field_id` = 0
2748
                        WHERE `field_id` = %d
2749
                    ", array(
2750
                        $old_sister_id
2751
                    )
2752
                );
2753
            }
2754
        }
2755
2756
        if ( !empty( $old_id ) && $old_name != $field[ 'name' ] && true === $db ) {
2757
            pods_query( "