Skip to content

Commit

Permalink
minor adjustments for PR #23
Browse files Browse the repository at this point in the history
  • Loading branch information
psolom committed Aug 7, 2016
1 parent 723a709 commit 66d9692
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
20 changes: 10 additions & 10 deletions connectors/php/LocalFilemanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -826,11 +826,11 @@ protected function has_system_permission($filepath, $permissions)
return true;
}

/**
* Create array with file properties
* @param string $relative_path
* @return array|void
*/
/**
* Create array with file properties
* @param string $relative_path
* @return array
*/
protected function get_file_info($relative_path)
{
$current_path = $this->getFullPath($relative_path);
Expand Down Expand Up @@ -1271,10 +1271,10 @@ protected function get_thumbnail($path)

/**
* Creates thumbnail from the original image
* @param $thumbPath
* @param $imagePath
* @param $thumbnailPath
*/
protected function createThumbnail($thumbPath, $thumbnailPath)
protected function createThumbnail($imagePath, $thumbnailPath)
{
if($this->config['images']['thumbnail']['enabled'] === true) {
$this->__log('generating thumbnail "' . $thumbnailPath . '"');
Expand All @@ -1285,9 +1285,9 @@ protected function createThumbnail($thumbPath, $thumbnailPath)
}

$this->initUploader(array(
'upload_dir' => dirname($thumbPath) . '/',
))->create_thumbnail_image($thumbPath);
'upload_dir' => dirname($imagePath) . '/',
))->create_thumbnail_image($imagePath);
}
}

}
}
7 changes: 4 additions & 3 deletions scripts/filemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1851,10 +1851,11 @@ var getFileInfo = function(file) {
// add the new markup to the DOM
getSectionContainer($fileinfo).html(template);

// if file is an image we display the preview
var previewPath = isImageFile(data['Filename']) ? data['Preview'] : data['Thumbnail'];
$fileinfo.find('img').attr('src', createPreviewUrl(previewPath));
$fileinfo.find('#main-title > h1').text(data['Filename']).attr('title', file);

// if file is an image we display the preview
$fileinfo.find('img').attr('src', isImageFile(data['Filename']) ? createPreviewUrl(data['Preview']) : createPreviewUrl(data['Thumbnail']));
if(isVideoFile(data['Filename']) && config.videos.showVideoPlayer == true) {
getVideoPlayer(data);
}
Expand Down Expand Up @@ -2896,4 +2897,4 @@ if (!window.location.origin) {

$(window).load(function() {
$('#fileinfo').css({'left':$('#splitter .vsplitbar').width() + $('#filetree').width()});
});
});
Loading

0 comments on commit 66d9692

Please sign in to comment.