mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Make it easier to switch between v1/v2 layout.
This commit is contained in:
parent
27815d0311
commit
329c3b14d5
@ -91,12 +91,11 @@ if (!function_exists('prefixView')) {
|
||||
// do something with view:
|
||||
$layout = env('FIREFLY_III_LAYOUT', 'v1');
|
||||
$prefixView = sprintf('%s/%s', $layout, $view);
|
||||
if(false ===$factory->exists($view)) {
|
||||
if(false ===$factory->exists($prefixView)) {
|
||||
// fall back to v1.
|
||||
$prefixView = sprintf('%s/%s', 'v1', $view);
|
||||
}
|
||||
}
|
||||
|
||||
return $factory->make($prefixView, $data, $mergeData);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user