From 33557f37921bd61b565ca1b18ec617d83e565413 Mon Sep 17 00:00:00 2001 From: snipe Date: Sat, 8 Jul 2017 00:22:30 -0700 Subject: [PATCH] Nicer formatting for phpinfo output --- app/Http/Controllers/SettingsController.php | 6 ++- resources/views/settings/phpinfo.blade.php | 44 ++++++++++++++++----- 2 files changed, 39 insertions(+), 11 deletions(-) diff --git a/app/Http/Controllers/SettingsController.php b/app/Http/Controllers/SettingsController.php index f930457edb..d1ed933ce1 100755 --- a/app/Http/Controllers/SettingsController.php +++ b/app/Http/Controllers/SettingsController.php @@ -696,7 +696,11 @@ class SettingsController extends Controller */ public function getPhpInfo() { - return view('settings.phpinfo'); + if (config('app.debug')=== true) { + return view('settings.phpinfo'); + } + return redirect()->route('settings.index') + ->with('error', 'PHP syetem debugging information is only available when debug is enabled in your .env file.'); } diff --git a/resources/views/settings/phpinfo.blade.php b/resources/views/settings/phpinfo.blade.php index 4513d2626c..9b43b08c2a 100644 --- a/resources/views/settings/phpinfo.blade.php +++ b/resources/views/settings/phpinfo.blade.php @@ -11,21 +11,45 @@ @stop + {{-- Page content --}} @section('content') - @if (config('app.debug')=== true) +
- -
-
+
+
+

{{ trans('admin/settings/general.system') }}

+
+
- @else -
-
- This information is only available when debug is enabled. -
- @endif + (.*?).*?(.*)%s', ob_get_clean(), $matches); + # $matches [1]; # Style information + # $matches [2]; # Body information + + echo "
\n", + $matches[2], + "\n
\n"; + ?> +
+
+
+ + + @stop