mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-29 18:20:01 +00:00
Add some debug info.
This commit is contained in:
@@ -27,6 +27,7 @@ use Carbon\Carbon;
|
|||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
use FireflyIII\Support\Http\Controllers\RequestInformation;
|
use FireflyIII\Support\Http\Controllers\RequestInformation;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class SessionFilter.
|
* Class SessionFilter.
|
||||||
@@ -63,6 +64,7 @@ class Range
|
|||||||
{
|
{
|
||||||
// ignore preference. set the range to be the current month:
|
// ignore preference. set the range to be the current month:
|
||||||
if (!app('session')->has('start') && !app('session')->has('end')) {
|
if (!app('session')->has('start') && !app('session')->has('end')) {
|
||||||
|
Log::debug('setRange: Session has no start or end.');
|
||||||
$viewRange = app('preferences')->get('viewRange', '1M')->data;
|
$viewRange = app('preferences')->get('viewRange', '1M')->data;
|
||||||
if (is_array($viewRange)) {
|
if (is_array($viewRange)) {
|
||||||
$viewRange = '1M';
|
$viewRange = '1M';
|
||||||
@@ -76,6 +78,7 @@ class Range
|
|||||||
app('session')->put('end', $end);
|
app('session')->put('end', $end);
|
||||||
}
|
}
|
||||||
if (!app('session')->has('first')) {
|
if (!app('session')->has('first')) {
|
||||||
|
Log::debug('setRange: Session has no "first".');
|
||||||
/** @var JournalRepositoryInterface $repository */
|
/** @var JournalRepositoryInterface $repository */
|
||||||
$repository = app(JournalRepositoryInterface::class);
|
$repository = app(JournalRepositoryInterface::class);
|
||||||
$journal = $repository->firstNull();
|
$journal = $repository->firstNull();
|
||||||
|
@@ -750,6 +750,8 @@ class Navigation
|
|||||||
$function = $functionMap[$range];
|
$function = $functionMap[$range];
|
||||||
$end->{$function}(); // @phpstan-ignore-line
|
$end->{$function}(); // @phpstan-ignore-line
|
||||||
|
|
||||||
|
Log::debug(sprintf('updateEndDate returns "%s"', $end->format('Y-m-d')));
|
||||||
|
|
||||||
return $end;
|
return $end;
|
||||||
}
|
}
|
||||||
if ('6M' === $range) {
|
if ('6M' === $range) {
|
||||||
@@ -806,6 +808,7 @@ class Navigation
|
|||||||
if (array_key_exists($range, $functionMap)) {
|
if (array_key_exists($range, $functionMap)) {
|
||||||
$function = $functionMap[$range];
|
$function = $functionMap[$range];
|
||||||
$start->{$function}(); // @phpstan-ignore-line
|
$start->{$function}(); // @phpstan-ignore-line
|
||||||
|
Log::debug(sprintf('updateStartDate returns "%s"', $start->format('Y-m-d')));
|
||||||
|
|
||||||
return $start;
|
return $start;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user