From c5a5f17643274b014f088723021c921eb5dbb5fd Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 23 May 2015 09:00:11 +0200 Subject: [PATCH] Encrypt more stuff in the cleanup routine [skip ci] --- app/Http/Middleware/Cleanup.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/Http/Middleware/Cleanup.php b/app/Http/Middleware/Cleanup.php index b8aae095df..a98f406224 100644 --- a/app/Http/Middleware/Cleanup.php +++ b/app/Http/Middleware/Cleanup.php @@ -8,6 +8,7 @@ use FireflyIII\Models\BudgetLimit; use FireflyIII\Models\Category; use FireflyIII\Models\LimitRepetition; use FireflyIII\Models\PiggyBank; +use FireflyIII\Models\PiggyBankEvent; use FireflyIII\Models\Preference; use FireflyIII\Models\Reminder; use FireflyIII\Models\TransactionJournal; @@ -206,6 +207,16 @@ class Cleanup unset($set, $entry, $amount); //encrypt piggy bank event amount + $set = PiggyBankEvent::whereNull('amount_encrypted')->take(5)->get(); + /** @var PiggyBankEvent $entry */ + foreach ($set as $entry) { + $count++; + $amount = $entry->amount; + $entry->amount = $amount; + $entry->save(); + } + unset($set, $entry, $amount); + //encrypt piggy bank repetition currentamount //encrypt piggy bank targetamount //encrypt preference name (add field)