Skip to content

Commit

Permalink
[VD:abstract] optimize createTmb()
Browse files Browse the repository at this point in the history
  • Loading branch information
nao-pon committed Apr 30, 2016
1 parent f813fba commit a30b3e8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion php/elFinderVolumeDriver.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -4232,7 +4232,11 @@ protected function createTmb($path, $stat) {
}

if ($result) {
$result = $this->imgSquareFit($result, $tmbSize, $tmbSize, 'center', 'middle', $this->options['tmbBgColor'], 'png' );
if ($s = @getimagesize($tmb)) {
if ($s[0] !== $tmbSize || $s[1] !== $tmbSize) {
$result = $this->imgSquareFit($result, $tmbSize, $tmbSize, 'center', 'middle', $this->options['tmbBgColor'], 'png' );
}
}
}
}

Expand Down

0 comments on commit a30b3e8

Please sign in to comment.