|
4 | 4 | use Illuminate\Support\Facades\Config; |
5 | 5 | use Illuminate\Support\Facades\File; |
6 | 6 | use Illuminate\Support\Facades\Input; |
7 | | -use Illuminate\Support\Facades\Request; |
8 | | -use Illuminate\Support\Facades\View; |
9 | | -use Intervention\Image\Facades\Image; |
10 | 7 |
|
11 | 8 | /** |
12 | 9 | * Class LfmController |
@@ -54,7 +51,7 @@ public function show() |
54 | 51 | $working_dir = DIRECTORY_SEPARATOR; |
55 | 52 | $working_dir .= (Config::get('lfm.allow_multi_user')) ? \Auth::user()->user_field : Config::get('lfm.shared_folder_name'); |
56 | 53 |
|
57 | | - return View::make('laravel-filemanager::index') |
| 54 | + return view('laravel-filemanager::index') |
58 | 55 | ->with('working_dir', $working_dir) |
59 | 56 | ->with('file_type', $this->file_type); |
60 | 57 | } |
@@ -89,12 +86,17 @@ private function formatLocation($location, $type = null, $get_thumb = false) |
89 | 86 |
|
90 | 87 | $working_dir = Input::get('working_dir'); |
91 | 88 |
|
| 89 | + // remove first slash |
92 | 90 | if (substr($working_dir, 0, 1) === DIRECTORY_SEPARATOR) { |
93 | 91 | $working_dir = substr($working_dir, 1); |
94 | 92 | } |
95 | 93 |
|
96 | 94 | $location .= $working_dir; |
97 | 95 |
|
| 96 | + if ($type === 'directory' || $type === 'thumb') { |
| 97 | + $location .= DIRECTORY_SEPARATOR; |
| 98 | + } |
| 99 | + |
98 | 100 | if ($type === 'thumb') { |
99 | 101 | $location .= Config::get('lfm.thumb_folder_name') . DIRECTORY_SEPARATOR; |
100 | 102 | } |
@@ -138,7 +140,7 @@ public function getDirectories($path) |
138 | 140 | foreach ($all_directories as $directory) { |
139 | 141 | $dir_name = $this->getFileName($directory); |
140 | 142 |
|
141 | | - if ($dir_name !== $thumb_folder_name) { |
| 143 | + if ($dir_name['short'] !== $thumb_folder_name) { |
142 | 144 | $arr_dir[] = $dir_name; |
143 | 145 | } |
144 | 146 | } |
|
0 commit comments