Skip to content

Commit b880cd8

Browse files
authored
Merge pull request #138 from systeminc/development
Fixing tinymce
2 parents bb108c1 + 502a9cb commit b880cd8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Http/Controllers/AdminController.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,12 @@
99
use Response;
1010
use Storage;
1111
use SystemInc\LaravelAdmin\Admin;
12+
use SystemInc\LaravelAdmin\Traits\HelpersTrait;
1213

1314
class AdminController extends Controller
1415
{
16+
use HelpersTrait;
17+
1518
/**
1619
* Index admin page.
1720
*
@@ -99,7 +102,7 @@ public function anyUploadTinyImage(Request $request)
99102
$allowed = ['jpg', 'jpeg', 'gif', 'png'];
100103

101104
foreach ($request->file('files') as $file) {
102-
if ($file->isValid() && in_array($file->getClientOriginalExtension(), $allowed) && strpos($directory, 'images/tiny') != false) {
105+
if ($file->isValid() && in_array($file->getClientOriginalExtension(), $allowed) && strpos($directory, 'images/tiny') !== false) {
103106
$original = $this->cleanSpecialChars($file->getClientOriginalName());
104107

105108
$original_image = Image::make($file)->encode();
@@ -122,7 +125,7 @@ public function postDeleteTinyImage(Request $request)
122125
{
123126
$path = $request->get('path');
124127

125-
if (Storage::exists($path) && strpos($path, 'images/tiny') != false) {
128+
if (Storage::exists($path) && strpos($path, 'images/tiny') !== false) {
126129
Storage::delete($path);
127130
}
128131

0 commit comments

Comments
 (0)