Extra debug info for #2159 and some kernel changes.

This commit is contained in:
James Cole
2019-03-16 21:54:25 +01:00
parent e2ebd01719
commit f6f21e02ac
3 changed files with 18 additions and 1 deletions

View File

@@ -221,6 +221,7 @@ class SingleController extends Controller
*/ */
public function delete(TransactionJournal $journal) public function delete(TransactionJournal $journal)
{ {
Log::debug(sprintf('Start of delete view for journal #%d', $journal->id));
// Covered by another controller's tests // Covered by another controller's tests
// @codeCoverageIgnoreStart // @codeCoverageIgnoreStart
if ($this->isOpeningBalance($journal)) { if ($this->isOpeningBalance($journal)) {
@@ -232,6 +233,7 @@ class SingleController extends Controller
$subTitle = (string)trans('firefly.delete_' . $what, ['description' => $journal->description]); $subTitle = (string)trans('firefly.delete_' . $what, ['description' => $journal->description]);
// put previous url in session // put previous url in session
Log::debug('Will try to remember previous URI');
$this->rememberPreviousUri('transactions.delete.uri'); $this->rememberPreviousUri('transactions.delete.uri');
return view('transactions.single.delete', compact('journal', 'subTitle', 'what')); return view('transactions.single.delete', compact('journal', 'subTitle', 'what'));

View File

@@ -184,7 +184,21 @@ class Kernel extends HttpKernel
'bindings', 'bindings',
], ],
]; ];
/**
* The priority-sorted list of middleware.
*
* This forces non-global middleware to always be in the given order.
*
* @var array
*/
protected $middlewarePriority
= [
StartFireflySession::class,
ShareErrorsFromSession::class,
Authenticate::class,
Binder::class,
Authorize::class,
];
/** /**
* The application's route middleware. * The application's route middleware.
* *

View File

@@ -50,6 +50,7 @@ trait UserNavigation
*/ */
protected function getPreviousUri(string $identifier): string protected function getPreviousUri(string $identifier): string
{ {
Log::debug(sprintf('Trying to retrieve URL stored under "%s"', $identifier));
// "forbidden" words for specific identifiers: // "forbidden" words for specific identifiers:
// if these are in the previous URI, don't refer back there. // if these are in the previous URI, don't refer back there.
$array = [ $array = [