Skip to content

Commit 2879f91

Browse files
committed
rename getImageUrl to getFileUrl
1 parent 4783d0f commit 2879f91

File tree

5 files changed

+7
-8
lines changed

5 files changed

+7
-8
lines changed

src/controllers/CropController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class CropController extends LfmController
1717
public function getCrop()
1818
{
1919
$working_dir = request('working_dir');
20-
$img = parent::getImageUrl(request('img'));
20+
$img = parent::getFileUrl(request('img'));
2121

2222
return view('laravel-filemanager::crop')
2323
->with(compact('working_dir', 'img'));
@@ -44,6 +44,6 @@ public function getCropimage()
4444
// make new thumbnail
4545
Image::make($image_path)
4646
->fit(200, 200)
47-
->save(parent::getThumbPath(parent::getFileName($image)['short']));
47+
->save(parent::getThumbPath(parent::getName($image)));
4848
}
4949
}

src/controllers/ItemsController.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ public function getItems()
1818
$path = parent::getCurrentPath();
1919

2020
return view($this->getView())->with([
21-
'type' => $this->currentLfmType(true),
2221
'files' => $this->getFilesWithInfo($path),
2322
'directories' => parent::getDirectories($path)
2423
]);
@@ -30,7 +29,7 @@ private function getFilesWithInfo($path)
3029
$arr_files = [];
3130

3231
foreach (File::files($path) as $key => $file) {
33-
$file_name = parent::getFileName($file)['short'];
32+
$file_name = parent::getName($file);
3433
$file_created = filemtime($file);
3534
$file_size = $this->humanFilesize(File::size($file));
3635

src/controllers/ResizeController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function getResize()
4242
}
4343

4444
return view('laravel-filemanager::resize')
45-
->with('img', parent::getImageUrl($image))
45+
->with('img', parent::getFileUrl($image))
4646
->with('height', number_format($height, 0))
4747
->with('width', $width)
4848
->with('original_height', $original_height)

src/controllers/UploadController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ private function makeThumb($new_filename)
141141

142142
private function useFile($new_filename)
143143
{
144-
$file = parent::getImageUrl($new_filename);
144+
$file = parent::getFileUrl($new_filename);
145145

146146
return "<script type='text/javascript'>
147147

src/traits/LfmHelpers.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ public function getCurrentPath($file_name = null, $is_thumb = null)
2828

2929
public function getThumbUrl($image_name = null)
3030
{
31-
return $this->getImageUrl($image_name, 'thumb');
31+
return $this->getFileUrl($image_name, 'thumb');
3232
}
3333

34-
public function getImageUrl($image_name = null, $is_thumb = null)
34+
public function getFileUrl($image_name = null, $is_thumb = null)
3535
{
3636
$url = $this->composeSegments('url', $is_thumb) . $image_name;
3737

0 commit comments

Comments
 (0)