diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-04-02 17:34:48 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-04-02 17:34:48 +0200 |
commit | bca6cc6f741ae957a345ca21d689a5f23d964d9a (patch) | |
tree | a4070f4d80ae12ed9b1bf6b1073ff1a0af1ee49a /lib/private | |
parent | b8248f4a0acf0de228774aec0f7150a538ed09e6 (diff) | |
download | nextcloud-server-bca6cc6f741ae957a345ca21d689a5f23d964d9a.tar.gz nextcloud-server-bca6cc6f741ae957a345ca21d689a5f23d964d9a.zip |
remove unnecessary code
Diffstat (limited to 'lib/private')
-rwxr-xr-x | lib/private/preview.php | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/private/preview.php b/lib/private/preview.php index 963cda66992..493ed90f770 100755 --- a/lib/private/preview.php +++ b/lib/private/preview.php @@ -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; } /** |