remove unnecessary code

remotes/origin/ldap_group_count
Jörn Friedrich Dreyer 11 years ago
parent b8248f4a0a
commit bca6cc6f74
  1. 18
      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;
}
/**

Loading…
Cancel
Save