mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 14:23:17 -04:00
refactor(files): use explicit empty check instead of elvis operator
Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
This commit is contained in:
parent
40d3118751
commit
fa2a7b9b2d
1 changed files with 5 additions and 2 deletions
|
|
@ -108,9 +108,12 @@ class OwnershipTransferService {
|
|||
if ($useUserId) {
|
||||
$cleanUserName = $sourceUid;
|
||||
} else {
|
||||
$cleanUserName = $this->sanitizeFolderName($sourceUser->getDisplayName()) ?: $sourceUid;
|
||||
$cleanUserName = $this->sanitizeFolderName($sourceUser->getDisplayName());
|
||||
if (empty($cleanUserName)) {
|
||||
$cleanUserName = $sourceUid;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$finalTarget = "$destinationUid/files/" . $this->sanitizeFolderName($l->t('Transferred from %1$s on %2$s', [$cleanUserName, $date]));
|
||||
try {
|
||||
$view->verifyPath(dirname($finalTarget), basename($finalTarget));
|
||||
|
|
|
|||
Loading…
Reference in a new issue