Code Duplication    Length = 7-7 lines in 2 locations

php/elFinder.class.php 1 location

@@ 1434-1440 (lines=7) @@
1431
			$mime = explode(';', $mime);
1432
			$mime = trim($mime[0]);
1433
			
1434
			if (in_array($mime, array('application/x-empty', 'inode/x-empty'))) {
1435
				// finfo return this mime for empty files
1436
				$mime = 'text/plain';
1437
			} elseif ($mime == 'application/x-zip') {
1438
				// http://elrte.org/redmine/issues/163
1439
				$mime = 'application/zip';
1440
			}
1441
		}
1442
		
1443
		return ($mime && isset($extTable[$mime]))? ('.' . $extTable[$mime]) : '';

php/elFinderVolumeDriver.class.php 1 location

@@ 3033-3039 (lines=7) @@
3030
		$type = explode(';', $type);
3031
		$type = trim($type[0]);
3032
3033
		if (in_array($type, array('application/x-empty', 'inode/x-empty'))) {
3034
			// finfo return this mime for empty files
3035
			$type = 'text/plain';
3036
		} elseif ($type == 'application/x-zip') {
3037
			// http://elrte.org/redmine/issues/163
3038
			$type = 'application/zip';
3039
		}
3040
		
3041
		// mime type normalization
3042
		$_checkKey = strtolower($ext.':'.$type);