Code Duplication    Length = 13-13 lines in 2 locations

fields/field.entry_relationship.php 2 locations

@@ 770-782 (lines=13) @@
767
					}
768
					
769
					// this section is not selected, bail out
770
					if (!is_array($validElements)) {
771
						if ($newItem) {
772
							if ($devkit) {
773
								$item->setAttribute('x-forbidden-by-ds', $curMode);
774
							}
775
							$root->appendChild($item);
776
						}
777
						continue;
778
					} else {
779
						if ($devkit) {
780
							$item->setAttribute('x-forbidden-by-ds', null);
781
						}
782
					}
783
					
784
					// selected fields for fetching
785
					$sectionElements = array();
@@ 819-831 (lines=13) @@
816
					}
817
					
818
					// Filtering is enabled, but nothing is selected
819
					if (is_array($sectionElements) && empty($sectionElements)) {
820
						if ($newItem) {
821
							$root->appendChild($item);
822
							if ($devkit) {
823
								$item->setAttribute('x-forbidden-by-selection', $curMode);
824
							}
825
						}
826
						continue;
827
					} else {
828
						if ($devkit) {
829
							$item->setAttribute('x-forbidden-by-selection', null);
830
						}
831
					}
832
					
833
					// fetch current entry again, but with data for the allowed schema
834
					$entry = $this->fetchEntry($eId, $sectionElements);