@@ -1,4 +1,4 @@ |
||
1 | -<?php $default = ! empty($formInput['placeholder']) ? $formInput['placeholder'] : cbTrans('text_prefix_option')." ".$label;?> |
|
1 | +<?php $default = !empty($formInput['placeholder']) ? $formInput['placeholder'] : cbTrans('text_prefix_option')." ".$label; ?> |
|
2 | 2 | @if($formInput['options']['parent_select']) |
3 | 3 | <script type="text/javascript"> |
4 | 4 | $(function () { |
@@ -43,16 +43,16 @@ |
||
43 | 43 | @if($row->{$formInput['options']['latitude']} && $row->{$formInput['options']['longitude']}) |
44 | 44 | var map = new google.maps.Map(document.getElementById('map-{{$name}}'), { |
45 | 45 | center: { |
46 | - lat: <?php echo $row->{$formInput['options']['latitude']} ?: 0;?>, |
|
47 | - lng: <?php echo $row->{$formInput['options']['longitude']} ?: 0;?> }, |
|
46 | + lat: <?php echo $row->{$formInput['options']['latitude']} ?: 0; ?>, |
|
47 | + lng: <?php echo $row->{$formInput['options']['longitude']} ?: 0; ?> }, |
|
48 | 48 | zoom: 12 |
49 | 49 | }); |
50 | 50 | var infoWindow = new google.maps.InfoWindow(); |
51 | 51 | |
52 | 52 | var marker = new google.maps.Marker({ |
53 | 53 | position: { |
54 | - lat: <?php echo $row->{$formInput['options']['latitude']} ?: 0;?>, |
|
55 | - lng: <?php echo $row->{$formInput['options']['longitude']} ?: 0;?> }, |
|
54 | + lat: <?php echo $row->{$formInput['options']['latitude']} ?: 0; ?>, |
|
55 | + lng: <?php echo $row->{$formInput['options']['longitude']} ?: 0; ?> }, |
|
56 | 56 | map: map, |
57 | 57 | title: '{{$value}}' |
58 | 58 | }); |
@@ -104,8 +104,8 @@ |
||
104 | 104 | var map = new google.maps.Map(document.getElementById('map-{{$name}}'), { |
105 | 105 | @if($row->{$formInput['options']['latitude']} && $row->{$formInput['options']['longitude']}) |
106 | 106 | center: { |
107 | - lat: <?php echo $row->{$formInput['options']['latitude']} ?: 0;?>, |
|
108 | - lng: <?php echo $row->{$formInput['options']['longitude']} ?: 0;?> }, |
|
107 | + lat: <?php echo $row->{$formInput['options']['latitude']} ?: 0; ?>, |
|
108 | + lng: <?php echo $row->{$formInput['options']['longitude']} ?: 0; ?> }, |
|
109 | 109 | @endif |
110 | 110 | zoom: 12 |
111 | 111 | }); |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php $default = ! empty($formInput['default']) ? $formInput['default'] : trans('crudbooster.text_prefix_option')." ".$label;?> |
|
1 | +<?php $default = !empty($formInput['default']) ? $formInput['default'] : trans('crudbooster.text_prefix_option')." ".$label; ?> |
|
2 | 2 | @if($formInput['parent_select']) |
3 | 3 | |
4 | 4 | @push('bottom') |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | <select class='form-control' id="{{$name}}" data-value='{{$value}}' {{$required}} {!!$placeholder!!} {{$readonly}} {{$disabled}} name="{{$name}}"> |
47 | 47 | <option value=''>{{$default}}</option> |
48 | 48 | <?php |
49 | - if (! $formInput['parent_select']) { |
|
49 | + if (!$formInput['parent_select']) { |
|
50 | 50 | if (@$formInput['dataquery']): |
51 | 51 | |
52 | 52 | $query = DB::select(DB::raw($formInput['dataquery'])); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -if ($formInput['options']['value']){ |
|
2 | +if ($formInput['options']['value']) { |
|
3 | 3 | $dataEnum = explode(';', $formInput['options']['enum']); |
4 | 4 | $result = []; |
5 | 5 | foreach (explode(';', $formInput['options']['value']) as $i => $v) { |
@@ -10,9 +10,9 @@ |
||
10 | 10 | foreach ($formInput['options']['enum'] as $i => $d) { |
11 | 11 | $options[$i]['label'] = $d; |
12 | 12 | if ($selects_value) { |
13 | - $options[$i]['value'] = $selects_value[$i]; |
|
13 | + $options[$i]['value'] = $selects_value[$i]; |
|
14 | 14 | } else { |
15 | - $options[$i]['value'] = $d; |
|
15 | + $options[$i]['value'] = $d; |
|
16 | 16 | } |
17 | 17 | } |
18 | 18 | endif; |
@@ -9,31 +9,31 @@ |
||
9 | 9 | { |
10 | 10 | public function handle($request, Closure $next) |
11 | 11 | { |
12 | - if (\Config::get('lfm.allow_multi_user') === true) { |
|
13 | - $slug = \Config::get('lfm.user_field'); |
|
12 | + if (\Config::get('lfm.allow_multi_user') === true) { |
|
13 | + $slug = \Config::get('lfm.user_field'); |
|
14 | 14 | |
15 | 15 | $new_working_dir = '/' . CRUDBooster::myId(); |
16 | 16 | |
17 | - $previous_dir = $request->input('working_dir'); |
|
17 | + $previous_dir = $request->input('working_dir'); |
|
18 | 18 | |
19 | - if ($previous_dir == null) { |
|
20 | - $request->merge(['working_dir' => $new_working_dir]); |
|
21 | - } elseif (! $this->validDir($previous_dir)) { |
|
22 | - $request->replace(['working_dir' => $new_working_dir]); |
|
23 | - } |
|
24 | - } |
|
19 | + if ($previous_dir == null) { |
|
20 | + $request->merge(['working_dir' => $new_working_dir]); |
|
21 | + } elseif (! $this->validDir($previous_dir)) { |
|
22 | + $request->replace(['working_dir' => $new_working_dir]); |
|
23 | + } |
|
24 | + } |
|
25 | 25 | |
26 | 26 | return $next($request); |
27 | 27 | } |
28 | 28 | |
29 | 29 | private function validDir($previous_dir) |
30 | 30 | { |
31 | - if (starts_with($previous_dir, '/' . \Config::get('lfm.shared_folder_name'))) { |
|
32 | - return true; |
|
31 | + if (starts_with($previous_dir, '/' . \Config::get('lfm.shared_folder_name'))) { |
|
32 | + return true; |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | if (starts_with($previous_dir, '/' . CRUDBooster::myId() )) { |
36 | - return true; |
|
36 | + return true; |
|
37 | 37 | } |
38 | 38 | |
39 | 39 | return false; |
@@ -12,13 +12,13 @@ discard block |
||
12 | 12 | if (\Config::get('lfm.allow_multi_user') === true) { |
13 | 13 | $slug = \Config::get('lfm.user_field'); |
14 | 14 | |
15 | - $new_working_dir = '/' . CRUDBooster::myId(); |
|
15 | + $new_working_dir = '/'.CRUDBooster::myId(); |
|
16 | 16 | |
17 | 17 | $previous_dir = $request->input('working_dir'); |
18 | 18 | |
19 | 19 | if ($previous_dir == null) { |
20 | 20 | $request->merge(['working_dir' => $new_working_dir]); |
21 | - } elseif (! $this->validDir($previous_dir)) { |
|
21 | + } elseif (!$this->validDir($previous_dir)) { |
|
22 | 22 | $request->replace(['working_dir' => $new_working_dir]); |
23 | 23 | } |
24 | 24 | } |
@@ -28,11 +28,11 @@ discard block |
||
28 | 28 | |
29 | 29 | private function validDir($previous_dir) |
30 | 30 | { |
31 | - if (starts_with($previous_dir, '/' . \Config::get('lfm.shared_folder_name'))) { |
|
31 | + if (starts_with($previous_dir, '/'.\Config::get('lfm.shared_folder_name'))) { |
|
32 | 32 | return true; |
33 | 33 | } |
34 | 34 | |
35 | - if (starts_with($previous_dir, '/' . CRUDBooster::myId() )) { |
|
35 | + if (starts_with($previous_dir, '/'.CRUDBooster::myId())) { |
|
36 | 36 | return true; |
37 | 37 | } |
38 | 38 |
@@ -10,7 +10,7 @@ |
||
10 | 10 | 'use_package_routes' => true, |
11 | 11 | |
12 | 12 | // For laravel 5.2, please set to ['web', 'auth'] |
13 | - 'middlewares' => ['web','\crocodicstudio\crudbooster\middlewares\CBBackend'], |
|
13 | + 'middlewares' => ['web', '\crocodicstudio\crudbooster\middlewares\CBBackend'], |
|
14 | 14 | |
15 | 15 | // Add prefix for routes |
16 | 16 | 'prefix' => 'laravel-filemanager', |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | $working_dir = '/'; |
55 | 55 | $working_dir .= (Config::get('lfm.allow_multi_user')) ? $this->getUserSlug() : Config::get('lfm.shared_folder_name'); |
56 | 56 | |
57 | - $extension_not_found = ! extension_loaded('gd') && ! extension_loaded('imagick'); |
|
57 | + $extension_not_found = !extension_loaded('gd') && !extension_loaded('imagick'); |
|
58 | 58 | |
59 | 59 | return view('laravel-filemanager::index') |
60 | 60 | ->with('working_dir', $working_dir) |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | private function formatLocation($location, $type = null, $get_thumb = false) |
86 | 86 | { |
87 | 87 | if ($type === 'share') { |
88 | - return $location . Config::get('lfm.shared_folder_name'); |
|
88 | + return $location.Config::get('lfm.shared_folder_name'); |
|
89 | 89 | } elseif ($type === 'user') { |
90 | - return $location . $this->getUserSlug(); |
|
90 | + return $location.$this->getUserSlug(); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | $working_dir = Input::get('working_dir'); |
@@ -106,10 +106,10 @@ discard block |
||
106 | 106 | |
107 | 107 | //if user is inside thumbs folder there is no need |
108 | 108 | // to add thumbs substring to the end of $location |
109 | - $in_thumb_folder = preg_match('/'.Config::get('lfm.thumb_folder_name').'$/i',$working_dir); |
|
109 | + $in_thumb_folder = preg_match('/'.Config::get('lfm.thumb_folder_name').'$/i', $working_dir); |
|
110 | 110 | |
111 | 111 | if ($type === 'thumb' && !$in_thumb_folder) { |
112 | - $location .= Config::get('lfm.thumb_folder_name') . '/'; |
|
112 | + $location .= Config::get('lfm.thumb_folder_name').'/'; |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | return $location; |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | public function getPath($type = null, $get_thumb = false) |
131 | 131 | { |
132 | - $path = base_path() . '/' . $this->file_location; |
|
132 | + $path = base_path().'/'.$this->file_location; |
|
133 | 133 | |
134 | 134 | $path = $this->formatLocation($path, $type); |
135 | 135 | |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | |
144 | 144 | $url = $this->formatLocation($url, $type); |
145 | 145 | |
146 | - $url = str_replace('\\','/',$url); |
|
146 | + $url = str_replace('\\', '/', $url); |
|
147 | 147 | |
148 | 148 | return $url; |
149 | 149 | } |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | |
177 | 177 | $arr_dir = explode('/', $lfm_file_path); |
178 | 178 | $arr_filename['short'] = end($arr_dir); |
179 | - $arr_filename['long'] = '/' . $lfm_file_path; |
|
179 | + $arr_filename['long'] = '/'.$lfm_file_path; |
|
180 | 180 | |
181 | 181 | return $arr_filename; |
182 | 182 | } |