Code Duplication    Length = 3-3 lines in 3 locations

php/elFinderVolumeDriver.class.php 3 locations

@@ 1522-1524 (lines=3) @@
1519
		}
1520
		
1521
		$mimeByName = elFinderVolumeDriver::mimetypeInternalDetect($name);
1522
		if ($mimeByName && $mimeByName !== 'unknown' && !$this->allowPutMime($mimeByName)) {
1523
			return $this->setError(elFinder::ERROR_INVALID_NAME, $name);
1524
		}
1525
		
1526
		if (!($file = $this->file($hash))) {
1527
			return $this->setError(elFinder::ERROR_FILE_NOT_FOUND);
@@ 1626-1628 (lines=3) @@
1623
			}
1624
		}
1625
1626
		if (!$this->allowPutMime($mime) || ($mimeByName && $mimeByName !== 'unknown' && !$this->allowPutMime($mimeByName))) {
1627
			return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME);
1628
		}
1629
1630
		$tmpsize = sprintf('%u', filesize($tmpname));
1631
		if ($this->uploadMaxSize > 0 && $tmpsize > $this->uploadMaxSize) {
@@ 1837-1839 (lines=3) @@
1834
				fclose($tp);
1835
			}
1836
		}
1837
		if (!$this->allowPutMime($mimeByName) || ($mime && $mime !== 'unknown' && !$this->allowPutMime($mime))) {
1838
			return $this->setError(elFinder::ERROR_UPLOAD_FILE_MIME);
1839
		}
1840
		
1841
		$this->clearcache();
1842
		return $this->convEncOut($this->_filePutContents($this->convEncIn($path), $content)) ? $this->stat($path) : false;