Code Duplication    Length = 3-3 lines in 3 locations

php/elFinderVolumeDriver.class.php 3 locations

@@ 1460-1462 (lines=3) @@
1457
		}
1458
		
1459
		$mimeByName = elFinderVolumeDriver::mimetypeInternalDetect($name);
1460
		if ($mimeByName && $mimeByName !== 'unknown' && !$this->allowPutMime($mimeByName)) {
1461
			return $this->setError(elFinder::ERROR_INVALID_NAME, $name);
1462
		}
1463
		
1464
		if (!($file = $this->file($hash))) {
1465
			return $this->setError(elFinder::ERROR_FILE_NOT_FOUND);
@@ 1564-1566 (lines=3) @@
1561
			}
1562
		}
1563
1564
		if (!$this->allowPutMime($mime) || ($mimeByName && $mimeByName !== 'unknown' && !$this->allowPutMime($mimeByName))) {
1565
			return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME);
1566
		}
1567
1568
		$tmpsize = sprintf('%u', filesize($tmpname));
1569
		if ($this->uploadMaxSize > 0 && $tmpsize > $this->uploadMaxSize) {
@@ 1775-1777 (lines=3) @@
1772
				fclose($tp);
1773
			}
1774
		}
1775
		if (!$this->allowPutMime($mimeByName) || ($mime && $mime !== 'unknown' && !$this->allowPutMime($mime))) {
1776
			return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME);
1777
		}
1778
		
1779
		$this->clearcache();
1780
		return $this->convEncOut($this->_filePutContents($this->convEncIn($path), $content)) ? $this->stat($path) : false;