mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-11-16 14:48:11 +00:00
For consistency, renamed some events.
This commit is contained in:
@@ -103,7 +103,7 @@ class TransactionController extends BaseController
|
||||
/*
|
||||
* Trigger creation of new piggy bank event
|
||||
*/
|
||||
Event::fire('piggybank.destroyTransfer', [$transactionJournal]); // new and used.
|
||||
Event::fire('transactionJournal.destroy', [$transactionJournal]); // new and used.
|
||||
|
||||
/** @var \FireflyIII\Database\TransactionJournal $repository */
|
||||
$repository = App::make('FireflyIII\Database\TransactionJournal');
|
||||
@@ -324,9 +324,11 @@ class TransactionController extends BaseController
|
||||
* Trigger a search for the related (if selected)
|
||||
* piggy bank and store an event.
|
||||
*/
|
||||
$piggyID = null;
|
||||
if (!is_null(Input::get('piggybank_id')) && intval(Input::get('piggybank_id')) > 0) {
|
||||
Event::fire('piggybank.storeTransfer', [$journal, intval(Input::get('piggybank_id'))]); // new and used.
|
||||
$piggyID = intval(Input::get('piggybank_id'));
|
||||
}
|
||||
Event::fire('transactionJournal.store', [$journal, $piggyID]); // new and used.
|
||||
|
||||
if ($data['post_submit_action'] == 'create_another') {
|
||||
return Redirect::route('transactions.create', $what)->withInput();
|
||||
@@ -371,7 +373,7 @@ class TransactionController extends BaseController
|
||||
if ($messageBag->count() == 0) {
|
||||
// has been saved, return to index:
|
||||
Session::flash('success', 'Transaction updated!');
|
||||
Event::fire('piggybank.updateTransfer', [$journal]); // new and used.
|
||||
Event::fire('transactionJournal.update', [$journal]); // new and used.
|
||||
|
||||
if (Input::get('post_submit_action') == 'return_to_edit') {
|
||||
return Redirect::route('transactions.edit', $journal->id)->withInput();
|
||||
|
||||
Reference in New Issue
Block a user