Code Duplication    Length = 12-12 lines in 2 locations

lib/templates/pobject/system.get.icon.php 1 location

@@ 19-30 (lines=12) @@
16
		}
17
18
		$icon=$ARCurrent->arTypeIcons[$type][$size];
19
		if (!$icon) {
20
			$dotPos=strpos($type, '.');
21
			if (false!==$dotPos) {
22
				$realtype=substr($type, 0, $dotPos);
23
				$ARCurrent->arTypeIcons[$type] = $ARCurrent->arTypeIcons[$realtype];
24
				$icon=$ARCurrent->arTypeIcons[$realtype][$size];
25
			} else {
26
				$realsize = ($size == "default") ? "large" : $size;
27
				$icon=$AR->dir->images."icons/".$realsize."/unknown.png";
28
				$ARCurrent->arTypeIcons[$type][$size] = $icon;
29
			}
30
		}
31
		$arResult=$icon;
32
	}
33
?>

lib/templates/pphoto/system.get.icon.php 1 location

@@ 24-35 (lines=12) @@
21
			$icon=$ARCurrent->arTypeIcons[$type][$size];
22
		}
23
24
		if (!$icon) {
25
			$dotPos=strpos($type, '.');
26
			if (false!==$dotPos) {
27
				$realtype=substr($type, 0, $dotPos);
28
				$ARCurrent->arTypeIcons[$type] = $ARCurrent->arTypeIcons[$realtype];
29
				$icon=$ARCurrent->arTypeIcons[$realtype][$size];
30
			} else {
31
				$realsize = ($size == "default") ? "large" : $size;
32
				$icon=$AR->dir->images."icons/".$realsize."/unknown.png";
33
				$ARCurrent->arTypeIcons[$type][$size] = $icon;
34
			}
35
		}
36
		$arResult=$icon;
37
	}
38
?>