Code Duplication    Length = 13-14 lines in 2 locations

lib/elFinderVolumeDriver.class.php 2 locations

@@ 1086-1099 (lines=14) @@
1083
		        $file = dirname(dirname(__FILE__)).DIRECTORY_SEPARATOR.'mime.types';
1084
		    }
1085
1086
		    if ($file && file_exists($file)) {
1087
		        $mimecf = file($file);
1088
1089
		        foreach ($mimecf as $line_num => $line) {
1090
		            if (! preg_match('/^\s*#/', $line)) {
1091
		                $mime = preg_split('/\s+/', $line, -1, PREG_SPLIT_NO_EMPTY);
1092
		                for ($i = 1, $size = count($mime); $i < $size; $i++) {
1093
		                    if (! isset(self::$mimetypes[$mime[$i]])) {
1094
		                        self::$mimetypes[$mime[$i]] = $mime[0];
1095
		                    }
1096
		                }
1097
		            }
1098
		        }
1099
		    }
1100
		}
1101
1102
	    $this->rootName = empty($this->options['alias']) ? $this->basenameCE($this->root) : $this->options['alias'];
@@ 4313-4325 (lines=13) @@
4310
		    if ($file === '' || ! is_readable($file)) {
4311
		        $file = dirname(__FILE__).DIRECTORY_SEPARATOR.'mime.types';
4312
		    }
4313
		    if (is_readable($file)) {
4314
		        $mimecf = file($file);
4315
		        foreach ($mimecf as $line_num => $line) {
4316
		            if (! preg_match('/^\s*#/', $line)) {
4317
		                $mime = preg_split('/\s+/', $line, -1, PREG_SPLIT_NO_EMPTY);
4318
		                for ($i = 1, $size = count($mime); $i < $size; $i++) {
4319
		                    if (! isset(self::$mimetypes[$mime[$i]])) {
4320
		                        self::$mimetypes[$mime[$i]] = $mime[0];
4321
		                    }
4322
		                }
4323
		            }
4324
		        }
4325
		    }
4326
		}
4327
	    $ext = '';
4328
	    if ($path) {