mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 01:06:46 +00:00
Improve code for intro texts.
This commit is contained in:
@@ -67,12 +67,15 @@ class Controller extends BaseController
|
||||
|
||||
// get shown-intro-preference:
|
||||
if (auth()->check()) {
|
||||
$route = Route::currentRouteName();
|
||||
$route = Route::currentRouteName();
|
||||
$originalRoute = $route;
|
||||
$route = str_replace('.', '_', $route);
|
||||
$key = 'shown_demo_' . $route;
|
||||
$config = config('intro.' . $route);
|
||||
$shownDemo = Preferences::get($key, false)->data;
|
||||
|
||||
// TODO get parameters from route?
|
||||
|
||||
$route = str_replace('.', '_', $route);
|
||||
$key = 'shown_demo_' . $route;
|
||||
$config = config('intro.' . $route);
|
||||
$shownDemo = Preferences::get($key, false)->data;
|
||||
if (is_null($config) || (is_array($config) && count($config) === 0)) {
|
||||
// no demo when no data for demo.
|
||||
$shownDemo = true;
|
||||
|
Reference in New Issue
Block a user