Code Duplication    Length = 28-28 lines in 2 locations

classes/PodsUI.php 2 locations

@@ 4337-4364 (lines=28) @@
4334
4335
                        $value = null;
4336
4337
                        if ( is_object( $this->pod ) )
4338
                            $value = $this->pod->field( $the_match, true );
4339
                        else {
4340
                            if ( empty( $row ) )
4341
                                $row = $this->row;
4342
4343
                            if ( isset( $row[ $the_match ] ) ) {
4344
                                if ( is_array( $row[ $the_match ] ) ) {
4345
                                    if ( false !== strpos( $the_match, '.' ) ) {
4346
                                        $the_matches = explode( '.', $the_match );
4347
4348
                                        $value = $row[ $the_match ];
4349
4350
                                        foreach ( $the_matches as $m ) {
4351
                                            if ( is_array( $value ) && isset( $value[ $m ] ) )
4352
                                                $value = $value[ $m ];
4353
                                            else {
4354
                                                $value = null;
4355
4356
                                                break;
4357
                                            }
4358
                                        }
4359
                                    }
4360
                                }
4361
                                else
4362
                                    $value = $row[ $the_match ];
4363
                            }
4364
                        }
4365
4366
                        if ( is_array( $value ) ) {
4367
                            if ( !in_array( $the_match, $value ) )
@@ 4395-4422 (lines=28) @@
4392
                else {
4393
                    $value = null;
4394
4395
                    if ( is_object( $this->pod ) )
4396
                        $value = $this->pod->field( $match, true );
4397
                    else {
4398
                        if ( empty( $row ) )
4399
                            $row = $this->row;
4400
4401
                        if ( isset( $row[ $match ] ) ) {
4402
                            if ( is_array( $row[ $match ] ) ) {
4403
                                if ( false !== strpos( $match, '.' ) ) {
4404
                                    $matches = explode( '.', $match );
4405
4406
                                    $value = $row[ $match ];
4407
4408
                                    foreach ( $matches as $m ) {
4409
                                        if ( is_array( $value ) && isset( $value[ $m ] ) )
4410
                                            $value = $value[ $m ];
4411
                                        else {
4412
                                            $value = null;
4413
4414
                                            break;
4415
                                        }
4416
                                    }
4417
                                }
4418
                            }
4419
                            else
4420
                                $value = $row[ $match ];
4421
                        }
4422
                    }
4423
4424
                    if ( is_array( $value ) ) {
4425
                        if ( !in_array( $match, $value ) )