Code Duplication    Length = 5-6 lines in 2 locations

php/elFinder.class.php 2 locations

@@ 1415-1419 (lines=5) @@
1412
	protected function parse_data_scheme( $str, $extTable ) {
1413
		$data = $name = '';
1414
		if ($fp = fopen('data://'.substr($str, 5), 'rb')) {
1415
			if ($data = stream_get_contents($fp)) {
1416
				$meta = stream_get_meta_data($fp);
1417
				$ext = isset($extTable[$meta['mediatype']])? '.' . $extTable[$meta['mediatype']] : '';
1418
				$name = substr(md5($data), 0, 8) . $ext;
1419
			}
1420
			fclose($fp);
1421
		}
1422
		return array($data, $name);
@@ 1887-1892 (lines=6) @@
1884
						$this->uploadDebug = 'Upload error: unable open tmp file';
1885
					}
1886
					return $result;
1887
				} else {
1888
					// for form clipboard with Google Chrome
1889
					$type = $files['type'][$i];
1890
					$ext = isset($extTable[$type])? '.' . $extTable[$type] : '';
1891
					$name = substr(md5(basename($tmpname)), 0, 8) . $ext;
1892
				}
1893
			}
1894
			
1895
			// do hook function 'upload.presave'