Skip to content
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions config/filemanager.config.default.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
"culture": "en",
"theme": "flat-dark",
"defaultViewMode": "grid",
"filemanagerMode": "split",
"localizeGUI": true,
"showFullPath": false,
"showTitleAttr": false,
"showConfirmation": true,
"browseOnly": false,
"canCreateFolders": true,
"clipboard": true,
"searchBox": true,
"listFiles": true,
Expand Down Expand Up @@ -170,6 +172,15 @@
"extra_js": [],
"extra_js_async": true
},
"paths": {
"flash": "/scripts/",
"languages": "/languages/",
"images": "/scripts/jQuery-File-Upload/img",
"scripts": "/scripts/",
"styles": "/scripts/",
"themes": "/themes/",
"templates": "/scripts/templates/"
},
"url": "https://github.com/servocoder/RichFilemanager",
"version": "2.2.1"
}
2 changes: 1 addition & 1 deletion connectors/php/BaseFilemanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public function handleRequest()
break;

case 'getfolder':
if($this->getvar('path') && $this->getvard('skip', true, 0)) {
if($this->getvar('path') && $this->getvard('skip', true, 0) && $this->getvard('load', true, 0)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getvard()? Probably should be getvar().

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take a look for new function getvard which don't throw error if variable wasn't set. 3rd argument is default value which will be used if name not defined in $_GET.


$response = $this->actionGetFolder();
}
Expand Down
5 changes: 4 additions & 1 deletion connectors/php/LocalFilemanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ public function actionGetFolder()
$response_data = [];
$target_path = $this->get['path'];
$skipCount = $this->get['skip'];
//$load = 0 - both, 1 - folders, 2 - files
$load = $this->get['load'];
$filesSkipped = 0;
$target_fullpath = $this->getFullPath($target_path, true);
$lazyEnabled = $this->config['options']['lazy'];
Expand All @@ -168,7 +170,8 @@ public function actionGetFolder()
if($file != "." && $file != "..") {
//@todo Skip files not in that dirty way
if ($lazyEnabled && $filesSkipped++ < $skipCount) continue;
array_push($files_list, $file);
if ((is_dir($target_fullpath . $file) && $load != 2) || ($load != 1))
array_push($files_list, $file);
if ($lazyEnabled && count($files_list) >= $lazyLimit) {
$lazyFlag = false;
break;
Expand Down
2 changes: 2 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@
</button>
</form>
</div>
<!-- ko if: canCreateFolders() -->
<div class="button-group create-controls">
<button class="fm-btn-create-folder" type="button" data-bind="click: headerModel.createFolder">
<span data-bind="text: lg().new_folder"></span>
</button>
</div>
<!-- /ko -->
<!-- /ko -->
<div class="button-group viewmode-controls">
<button class="fm-btn-grid no-label" type="button" data-bind="click: headerModel.displayGrid, attr: {title: localizeGUI() ? lg().grid_view : null}, css: {active: viewMode() === 'grid'}">
<span>&nbsp;</span>
Expand Down
Loading