From 24ea20f769e1ab63981a8282734d4bffc60dbc90 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 10 Sep 2017 09:46:50 +0200 Subject: [PATCH] Various changes to make things work again. --- app/Http/Controllers/AttachmentController.php | 1 - app/Providers/AppServiceProvider.php | 13 ++----------- app/Support/ExpandedForm.php | 7 ++++--- config/database.php | 2 +- 4 files changed, 7 insertions(+), 16 deletions(-) diff --git a/app/Http/Controllers/AttachmentController.php b/app/Http/Controllers/AttachmentController.php index 6827d58fe2..34cd62b272 100644 --- a/app/Http/Controllers/AttachmentController.php +++ b/app/Http/Controllers/AttachmentController.php @@ -99,7 +99,6 @@ class AttachmentController extends Controller public function download(AttachmentRepositoryInterface $repository, Attachment $attachment) { - if ($repository->exists($attachment)) { $content = $repository->getContent($attachment); $quoted = sprintf('"%s"', addcslashes(basename($attachment->filename), '"\\')); diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 0458f6077b..0057d3afe5 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -15,6 +15,7 @@ namespace FireflyIII\Providers; use Illuminate\Support\ServiceProvider; use URL; +use Illuminate\Support\Facades\Schema; /** * Class AppServiceProvider @@ -30,17 +31,7 @@ class AppServiceProvider extends ServiceProvider */ public function boot() { - - // force root URL. - $forcedUrl = env('APP_FORCE_ROOT', ''); - if (strlen(strval($forcedUrl)) > 0) { - URL::forceRootUrl($forcedUrl); - } - - // force https urls - if (env('APP_FORCE_SSL', false)) { - URL::forceScheme('https'); - } + Schema::defaultStringLength(191); } /** diff --git a/app/Support/ExpandedForm.php b/app/Support/ExpandedForm.php index 5ba557a21d..b9e2936448 100644 --- a/app/Support/ExpandedForm.php +++ b/app/Support/ExpandedForm.php @@ -17,6 +17,7 @@ use Amount as Amt; use Carbon\Carbon; use Eloquent; use Illuminate\Support\Collection; +use Illuminate\Support\Facades\Request; use Illuminate\Support\MessageBag; use Input; use RuntimeException; @@ -332,7 +333,7 @@ class ExpandedForm $previousValue = null; try { - $previousValue = Input::old('post_submit_action'); + $previousValue = request()->old('post_submit_action'); } catch (RuntimeException $e) { // don't care } @@ -488,8 +489,8 @@ class ExpandedForm $value = isset($preFilled[$name]) && is_null($value) ? $preFilled[$name] : $value; } try { - if (!is_null(Input::old($name))) { - $value = Input::old($name); + if (!is_null(request()->old($name))) { + $value = request()->old($name); } } catch (RuntimeException $e) { // don't care about session errors. diff --git a/config/database.php b/config/database.php index 700d335b78..9309d7942a 100644 --- a/config/database.php +++ b/config/database.php @@ -6,7 +6,7 @@ return [ 'connections' => [ 'sqlite' => [ 'driver' => 'sqlite', - 'database' => env('DB_DATABASE', database_path('database.sqlite')), + 'database' => env('DB_DATABASE', storage_path('database/database.sqlite')), 'prefix' => '', ], 'mysql' => [