Skip to content

Commit

Permalink
fix thumbnails creation
Browse files Browse the repository at this point in the history
  • Loading branch information
dio-el-claire committed Jan 18, 2012
1 parent 0c80c88 commit add24c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions php/elFinderVolumeDriver.class.php
Expand Up @@ -1108,7 +1108,7 @@ public function parents($hash) {
* @author Dmitry (dio) Levashov
**/
public function tmb($hash) {
if ($path = $this->decode($hash)) {
if (($path = $this->decode($hash))) {
return ($tmb = $this->gettmb($path)) ? $tmb : $this->createTmb($path);
}
return false;
Expand Down Expand Up @@ -2535,7 +2535,8 @@ protected function canResize($path, $mime) {
* @author Dmitry (dio) Levashov
**/
protected function createTmb($path) {
if (!$this->canCreateTmb($path, $this->mimetype($path))) {
$stat = $this->stat($path);
if (!$stat || !$this->canCreateTmb($path, $stat['mime'])) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion php/elFinderVolumeMySQL.class.php
Expand Up @@ -149,7 +149,7 @@ protected function configure() {
if (!$this->tmpPath && $this->tmbPath && $this->tmbPathWritable) {
$this->tmpPath = $this->tmbPath;
}
echo $this->tmbPath;

$this->mimeDetect = 'internal';
}

Expand Down

0 comments on commit add24c2

Please sign in to comment.