Code Duplication    Length = 7-7 lines in 2 locations

php/elFinder.class.php 1 location

@@ 1427-1433 (lines=7) @@
1424
			$mime = explode(';', $mime);
1425
			$mime = trim($mime[0]);
1426
			
1427
			if (in_array($mime, array('application/x-empty', 'inode/x-empty'))) {
1428
				// finfo return this mime for empty files
1429
				$mime = 'text/plain';
1430
			} elseif ($mime == 'application/x-zip') {
1431
				// http://elrte.org/redmine/issues/163
1432
				$mime = 'application/zip';
1433
			}
1434
		}
1435
		
1436
		return ($mime && isset($extTable[$mime]))? ('.' . $extTable[$mime]) : '';

php/elFinderVolumeDriver.class.php 1 location

@@ 3000-3006 (lines=7) @@
2997
		$type = explode(';', $type);
2998
		$type = trim($type[0]);
2999
3000
		if (in_array($type, array('application/x-empty', 'inode/x-empty'))) {
3001
			// finfo return this mime for empty files
3002
			$type = 'text/plain';
3003
		} elseif ($type == 'application/x-zip') {
3004
			// http://elrte.org/redmine/issues/163
3005
			$type = 'application/zip';
3006
		}
3007
		
3008
		// mime type normalization
3009
		$_checkKey = strtolower($ext.':'.$type);