mirror of
https://github.com/nextcloud/server.git
synced 2026-04-28 09:37:29 -04:00
remove unnecessary code
This commit is contained in:
parent
b8248f4a0a
commit
bca6cc6f74
1 changed files with 2 additions and 16 deletions
|
|
@ -373,24 +373,8 @@ class Preview {
|
|||
$possibleThumbnails[$x] = $thumbnail['path'];
|
||||
}
|
||||
|
||||
if (count($possibleThumbnails) === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (count($possibleThumbnails) === 1) {
|
||||
return current($possibleThumbnails);
|
||||
}
|
||||
|
||||
ksort($possibleThumbnails);
|
||||
|
||||
if (key(reset($possibleThumbnails)) > $maxX) {
|
||||
return current(reset($possibleThumbnails));
|
||||
}
|
||||
|
||||
if (key(end($possibleThumbnails)) < $maxX) {
|
||||
return current(end($possibleThumbnails));
|
||||
}
|
||||
|
||||
foreach ($possibleThumbnails as $width => $path) {
|
||||
if ($width < $maxX) {
|
||||
continue;
|
||||
|
|
@ -398,6 +382,8 @@ class Preview {
|
|||
return $path;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue