Code Duplication    Length = 13-13 lines in 2 locations

fields/field.entry_relationship.php 2 locations

@@ 758-770 (lines=13) @@
755
					}
756
					
757
					// this section is not selected, bail out
758
					if (!is_array($validElements)) {
759
						if ($newItem) {
760
							if ($devkit) {
761
								$item->setAttribute('x-forbidden-by-ds', $curMode);
762
							}
763
							$root->appendChild($item);
764
						}
765
						continue;
766
					} else {
767
						if ($devkit) {
768
							$item->setAttribute('x-forbidden-by-ds', null);
769
						}
770
					}
771
					
772
					// selected fields for fetching
773
					$sectionElements = array();
@@ 807-819 (lines=13) @@
804
					}
805
					
806
					// Filtering is enabled, but nothing is selected
807
					if (is_array($sectionElements) && empty($sectionElements)) {
808
						if ($newItem) {
809
							$root->appendChild($item);
810
							if ($devkit) {
811
								$item->setAttribute('x-forbidden-by-selection', $curMode);
812
							}
813
						}
814
						continue;
815
					} else {
816
						if ($devkit) {
817
							$item->setAttribute('x-forbidden-by-selection', null);
818
						}
819
					}
820
					
821
					// fetch current entry again, but with data for the allowed schema
822
					$entry = $this->fetchEntry($eId, $sectionElements);