diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-10-17 00:56:57 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-10-17 10:58:27 +0200 |
commit | 74e69767791d3af36fe27c6c2a0bf0ff3336fce9 (patch) | |
tree | 42b544a1e589ba4f5b17b5d8ad3e9551b1a6c362 /apps | |
parent | c94f9f5e5f41b197dcbfbdc3526b8c5e6198d786 (diff) | |
download | nextcloud-server-74e69767791d3af36fe27c6c2a0bf0ff3336fce9.tar.gz nextcloud-server-74e69767791d3af36fe27c6c2a0bf0ff3336fce9.zip |
Use argument name from parent class
This will be an issue with php 8, so best to fix it now
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SFTP.php | 10 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SMB.php | 20 |
2 files changed, 15 insertions, 15 deletions
diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index e46f60d0be4..faf51369375 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -435,14 +435,14 @@ class SFTP extends \OC\Files\Storage\Common { /** * {@inheritdoc} */ - public function rename($source, $target) { + public function rename($path1, $path2) { try { - if ($this->file_exists($target)) { - $this->unlink($target); + if ($this->file_exists($path2)) { + $this->unlink($path2); } return $this->getConnection()->rename( - $this->absPath($source), - $this->absPath($target) + $this->absPath($path1), + $this->absPath($path2) ); } catch (\Exception $e) { return false; diff --git a/apps/files_external/lib/Lib/Storage/SMB.php b/apps/files_external/lib/Lib/Storage/SMB.php index c7055be3ed8..7e297885ded 100644 --- a/apps/files_external/lib/Lib/Storage/SMB.php +++ b/apps/files_external/lib/Lib/Storage/SMB.php @@ -306,31 +306,31 @@ class SMB extends Common implements INotifyStorage { /** * Rename the files. If the source or the target is the root, the rename won't happen. * - * @param string $source the old name of the path - * @param string $target the new name of the path + * @param string $path1 the old name of the path + * @param string $path2 the new name of the path * @return bool true if the rename is successful, false otherwise */ - public function rename($source, $target, $retry = true) { - if ($this->isRootDir($source) || $this->isRootDir($target)) { + public function rename($path1, $path2, $retry = true) { + if ($this->isRootDir($path1) || $this->isRootDir($path2)) { return false; } - $absoluteSource = $this->buildPath($source); - $absoluteTarget = $this->buildPath($target); + $absoluteSource = $this->buildPath($path1); + $absoluteTarget = $this->buildPath($path2); try { $result = $this->share->rename($absoluteSource, $absoluteTarget); } catch (AlreadyExistsException $e) { if ($retry) { - $this->remove($target); - $result = $this->share->rename($absoluteSource, $absoluteTarget, false); + $this->remove($path2); + $result = $this->share->rename($absoluteSource, $absoluteTarget); } else { $this->logger->logException($e, ['level' => ILogger::WARN]); return false; } } catch (InvalidArgumentException $e) { if ($retry) { - $this->remove($target); - $result = $this->share->rename($absoluteSource, $absoluteTarget, false); + $this->remove($path2); + $result = $this->share->rename($absoluteSource, $absoluteTarget); } else { $this->logger->logException($e, ['level' => ILogger::WARN]); return false; |