mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-31 19:27:51 -06:00
Fix redirect.
This commit is contained in:
parent
8f0fa02107
commit
7830a64170
@ -14,9 +14,8 @@ use Input;
|
|||||||
use Redirect;
|
use Redirect;
|
||||||
use Response;
|
use Response;
|
||||||
use Session;
|
use Session;
|
||||||
use View;
|
|
||||||
use URL;
|
use URL;
|
||||||
use Log;
|
use View;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class TransactionController
|
* Class TransactionController
|
||||||
@ -63,7 +62,7 @@ class TransactionController extends Controller
|
|||||||
Session::put('preFilled', $preFilled);
|
Session::put('preFilled', $preFilled);
|
||||||
|
|
||||||
// put previous url in session if not redirect from store (not "create another").
|
// put previous url in session if not redirect from store (not "create another").
|
||||||
if(Session::get('transactions.create.fromStore') !== true) {
|
if (Session::get('transactions.create.fromStore') !== true) {
|
||||||
Session::put('transactions.create.url', URL::previous());
|
Session::put('transactions.create.url', URL::previous());
|
||||||
}
|
}
|
||||||
Session::forget('transactions.create.fromStore');
|
Session::forget('transactions.create.fromStore');
|
||||||
@ -172,7 +171,7 @@ class TransactionController extends Controller
|
|||||||
$preFilled['account_to_id'] = $transactions[0]->account->id;
|
$preFilled['account_to_id'] = $transactions[0]->account->id;
|
||||||
|
|
||||||
// put previous url in session if not redirect from store (not "return_to_edit").
|
// put previous url in session if not redirect from store (not "return_to_edit").
|
||||||
if(Session::get('transactions.create.fromUpdate') !== true) {
|
if (Session::get('transactions.create.fromUpdate') !== true) {
|
||||||
Session::put('transactions.edit.url', URL::previous());
|
Session::put('transactions.edit.url', URL::previous());
|
||||||
}
|
}
|
||||||
Session::forget('transactions.create.fromUpdate');
|
Session::forget('transactions.create.fromUpdate');
|
||||||
@ -304,7 +303,8 @@ class TransactionController extends Controller
|
|||||||
|
|
||||||
if (intval(Input::get('create_another')) === 1) {
|
if (intval(Input::get('create_another')) === 1) {
|
||||||
// set value so create routine will not overwrite URL:
|
// set value so create routine will not overwrite URL:
|
||||||
Session::put('transactions.create.fromStore',true);
|
Session::put('transactions.create.fromStore', true);
|
||||||
|
|
||||||
return Redirect::route('transactions.create', $request->input('what'))->withInput();
|
return Redirect::route('transactions.create', $request->input('what'))->withInput();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -333,8 +333,9 @@ class TransactionController extends Controller
|
|||||||
|
|
||||||
if (intval(Input::get('return_to_edit')) === 1) {
|
if (intval(Input::get('return_to_edit')) === 1) {
|
||||||
// set value so edit routine will not overwrite URL:
|
// set value so edit routine will not overwrite URL:
|
||||||
Session::put('transactions.create.fromUpdate',true);
|
Session::put('transactions.create.fromUpdate', true);
|
||||||
return Redirect::route('transactions.edit', $journal->id);
|
|
||||||
|
return Redirect::route('transactions.edit', $journal->id)->withInput(['return_to_edit' => intval(Input::get('return_to_edit'))]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// redirect to previous URL.
|
// redirect to previous URL.
|
||||||
|
Loading…
Reference in New Issue
Block a user