@@ -40,13 +40,13 @@ discard block |
||
40 | 40 | $extension = isset($fileParts['extension']) ? ('.'.$fileParts['extension']) : ''; |
41 | 41 | |
42 | 42 | // Look to see if a number is already appended to a file. (example - file(1).pdf) |
43 | - if(preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match)) |
|
43 | + if(preg_match('/(.*?)(\d+)$/', $fileParts['filename'], $match)) |
|
44 | 44 | { |
45 | 45 | // Has a number, increment it |
46 | 46 | $base = $match[1]; |
47 | 47 | $number = intVal($match[2]); |
48 | - } |
|
49 | - else |
|
48 | + } |
|
49 | + else |
|
50 | 50 | { |
51 | 51 | // No number, add one |
52 | 52 | $base = $fileParts['filename']; |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | } |
55 | 55 | |
56 | 56 | // Increase the number until one that is not in use is found |
57 | - do |
|
57 | + do |
|
58 | 58 | { |
59 | 59 | $fileName = $base.'('.++$number.')'.$extension; |
60 | 60 | } while(Storage::exists($path.DIRECTORY_SEPARATOR.$fileName)); |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | { |
29 | 29 | // Verify the user is logged in and has permissions for this page |
30 | 30 | $this->middleware('auth'); |
31 | - $this->middleware(function ($request, $next) { |
|
31 | + $this->middleware(function($request, $next) { |
|
32 | 32 | $this->user = auth()->user(); |
33 | 33 | $this->authorize('hasAccess', 'use_file_links'); |
34 | 34 | return $next($request); |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | // Landing page shows all links that the user owns |
39 | 39 | public function index() |
40 | 40 | { |
41 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
41 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
42 | 42 | return view('links.index'); |
43 | 43 | } |
44 | 44 | |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | ]); |
334 | 334 | |
335 | 335 | Log::info('User ID '.Auth::user()->user_id.' disabled link ID - '.$id); |
336 | - Log::debug('Route ' . Route::currentRouteName() . ' visited by User ID-' . Auth::user()->user_id); |
|
336 | + Log::debug('Route '.Route::currentRouteName().' visited by User ID-'.Auth::user()->user_id); |
|
337 | 337 | return response()->json(['success' => true]); |
338 | 338 | } |
339 | 339 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | /* |
40 | 40 | * File Link Routes |
41 | 41 | */ |
42 | -Route::prefix('links')->name('links.')->group(function () { |
|
42 | +Route::prefix('links')->name('links.')->group(function() { |
|
43 | 43 | // Resource controllers for base access |
44 | 44 | Route::resource('data', 'FileLinks\FileLinksController'); |
45 | 45 | Route::get('new', 'FileLinks\FileLinksController@create')->name('new'); |