Issue #6991: Fix mismatch copyFromStorage method signature between \OC\Files\Storage\Common and its child classes

Signed-off-by: Teerapong Kraiamornchai <aima.kun@gmail.com>
This commit is contained in:
aimakun 2017-10-31 18:17:22 +07:00 committed by Teerapong Kraiamornchai
parent 08a7a9e3dc
commit ed727c9c8c
4 changed files with 5 additions and 5 deletions

View File

@ -183,7 +183,7 @@ class FailedStorage extends Common {
return true;
}
public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) {
throw new StorageNotAvailableException($this->e->getMessage(), $this->e->getCode(), $this->e);
}

View File

@ -419,7 +419,7 @@ class Local extends \OC\Files\Storage\Common {
* @param string $targetInternalPath
* @return bool
*/
public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) {
if ($sourceStorage->instanceOfStorage('\OC\Files\Storage\Local')) {
/**
* @var \OC\Files\Storage\Local $sourceStorage

View File

@ -156,7 +156,7 @@ class NullStorage extends Common {
return false;
}
public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) {
throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
}

View File

@ -26,8 +26,8 @@ class TemporaryNoTouch extends \OC\Files\Storage\Temporary {
}
class TemporaryNoCross extends \OC\Files\Storage\Temporary {
public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
return Common::copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath);
public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) {
return Common::copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime);
}
public function moveFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {