Code Duplication    Length = 28-28 lines in 2 locations

classes/PodsUI.php 2 locations

@@ 4953-4980 (lines=28) @@
4950
4951
						$value = null;
4952
4953
						if ( is_object( $this->pod ) ) {
4954
							$value = $this->pod->field( $the_match, true );
4955
						} else {
4956
							if ( empty( $row ) ) {
4957
								$row = $this->row;
4958
							}
4959
4960
							if ( isset( $row[ $the_match ] ) ) {
4961
								if ( is_array( $row[ $the_match ] ) ) {
4962
									if ( false !== strpos( $the_match, '.' ) ) {
4963
										$the_matches = explode( '.', $the_match );
4964
4965
										$value = $row[ $the_match ];
4966
4967
										foreach ( $the_matches as $m ) {
4968
											if ( is_array( $value ) && isset( $value[ $m ] ) ) {
4969
												$value = $value[ $m ];
4970
											} else {
4971
												$value = null;
4972
4973
												break;
4974
											}
4975
										}
4976
									}
4977
								} else {
4978
									$value = $row[ $the_match ];
4979
								}
4980
							}//end if
4981
						}//end if
4982
4983
						if ( is_array( $value ) ) {
@@ 5011-5038 (lines=28) @@
5008
				} else {
5009
					$value = null;
5010
5011
					if ( is_object( $this->pod ) ) {
5012
						$value = $this->pod->field( $match, true );
5013
					} else {
5014
						if ( empty( $row ) ) {
5015
							$row = $this->row;
5016
						}
5017
5018
						if ( isset( $row[ $match ] ) ) {
5019
							if ( is_array( $row[ $match ] ) ) {
5020
								if ( false !== strpos( $match, '.' ) ) {
5021
									$matches = explode( '.', $match );
5022
5023
									$value = $row[ $match ];
5024
5025
									foreach ( $matches as $m ) {
5026
										if ( is_array( $value ) && isset( $value[ $m ] ) ) {
5027
											$value = $value[ $m ];
5028
										} else {
5029
											$value = null;
5030
5031
											break;
5032
										}
5033
									}
5034
								}
5035
							} else {
5036
								$value = $row[ $match ];
5037
							}
5038
						}//end if
5039
					}//end if
5040
5041
					if ( is_array( $value ) ) {