mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-19 10:53:31 +00:00
This fixes #549
This commit is contained in:
@@ -31,7 +31,6 @@ use Log;
|
||||
use Preferences;
|
||||
use Session;
|
||||
use Steam;
|
||||
use URL;
|
||||
use View;
|
||||
|
||||
/**
|
||||
@@ -140,8 +139,7 @@ class SingleController extends Controller
|
||||
|
||||
// put previous url in session if not redirect from store (not "create another").
|
||||
if (session('transactions.create.fromStore') !== true) {
|
||||
$url = URL::previous();
|
||||
Session::put('transactions.create.url', $url);
|
||||
$this->rememberPreviousUri('transactions.create.uri');
|
||||
}
|
||||
Session::forget('transactions.create.fromStore');
|
||||
Session::flash('gaEventCategory', 'transactions');
|
||||
@@ -172,7 +170,7 @@ class SingleController extends Controller
|
||||
$subTitle = trans('firefly.delete_' . $what, ['description' => $journal->description]);
|
||||
|
||||
// put previous url in session
|
||||
Session::put('transactions.delete.url', URL::previous());
|
||||
$this->rememberPreviousUri('transactions.delete.uri');
|
||||
Session::flash('gaEventCategory', 'transactions');
|
||||
Session::flash('gaEventAction', 'delete-' . $what);
|
||||
|
||||
@@ -200,13 +198,7 @@ class SingleController extends Controller
|
||||
|
||||
Preferences::mark();
|
||||
|
||||
$uri = session('transactions.delete.url');
|
||||
if (!(strpos($uri, sprintf('transactions/show/%s', $journalId)) === false)) {
|
||||
// uri would point back to transaction
|
||||
$uri = route('transactions.index', [strtolower($type)]);
|
||||
}
|
||||
|
||||
return redirect($uri);
|
||||
return redirect($this->getPreviousUri('transactions.delete.uri'));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -275,7 +267,7 @@ class SingleController extends Controller
|
||||
|
||||
// put previous url in session if not redirect from store (not "return_to_edit").
|
||||
if (session('transactions.edit.fromUpdate') !== true) {
|
||||
Session::put('transactions.edit.url', URL::previous());
|
||||
$this->rememberPreviousUri('transactions.edit.uri');
|
||||
}
|
||||
Session::forget('transactions.edit.fromUpdate');
|
||||
|
||||
@@ -336,7 +328,7 @@ class SingleController extends Controller
|
||||
|
||||
|
||||
// redirect to previous URL.
|
||||
return redirect(session('transactions.create.url'));
|
||||
return redirect($this->getPreviousUri('transactions.create.uri'));
|
||||
|
||||
}
|
||||
|
||||
@@ -386,7 +378,6 @@ class SingleController extends Controller
|
||||
}
|
||||
|
||||
// redirect to previous URL.
|
||||
return redirect(session('transactions.edit.url'));
|
||||
|
||||
return redirect($this->getPreviousUri('transactions.edit.uri'));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user