Code Duplication    Length = 5-6 lines in 2 locations

php/elFinder.class.php 2 locations

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