Code Duplication    Length = 3-3 lines in 3 locations

php/elFinderVolumeDriver.class.php 3 locations

@@ 1566-1568 (lines=3) @@
1563
		}
1564
		
1565
		$mimeByName = elFinderVolumeDriver::mimetypeInternalDetect($name);
1566
		if ($mimeByName && $mimeByName !== 'unknown' && !$this->allowPutMime($mimeByName)) {
1567
			return $this->setError(elFinder::ERROR_INVALID_NAME, $name);
1568
		}
1569
		
1570
		if (!($file = $this->file($hash))) {
1571
			return $this->setError(elFinder::ERROR_FILE_NOT_FOUND);
@@ 1670-1672 (lines=3) @@
1667
			}
1668
		}
1669
1670
		if (!$this->allowPutMime($mime) || ($mimeByName && $mimeByName !== 'unknown' && !$this->allowPutMime($mimeByName))) {
1671
			return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME);
1672
		}
1673
1674
		$tmpsize = sprintf('%u', filesize($tmpname));
1675
		if ($this->uploadMaxSize > 0 && $tmpsize > $this->uploadMaxSize) {
@@ 1881-1883 (lines=3) @@
1878
				fclose($tp);
1879
			}
1880
		}
1881
		if (!$this->allowPutMime($mimeByName) || ($mime && $mime !== 'unknown' && !$this->allowPutMime($mime))) {
1882
			return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME);
1883
		}
1884
		
1885
		$this->clearcache();
1886
		return $this->convEncOut($this->_filePutContents($this->convEncIn($path), $content)) ? $this->stat($path) : false;