Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
3.2.5 will once again be capable of encrypting journal descriptions (and more, in the future).
James Cole5aa1db293f8e
diff --git a/app/database/migrations/2015_01_18_082406_changes_for_325.php b/app/database/migrations/2015_01_18_082406_changes_for_325.phpindex 55abb999c5..2e4eaa8830 100644--- a/app/database/migrations/2015_01_18_082406_changes_for_325.php+++ b/app/database/migrations/2015_01_18_082406_changes_for_325.php@@ -49,6 +49,15 @@ class ChangesFor325 extends Migration// don't care either.}+ // allow journal descriptions to be encrypted.+ Schema::table(+ 'transaction_journals', function (Blueprint $table) {+ $table->boolean('encrypted');++ }+ );+ DB::update('ALTER TABLE `transaction_journals` MODIFY `description` VARCHAR(1024)');+}}diff --git a/app/models/TransactionJournal.php b/app/models/TransactionJournal.phpindex fc019252fb..bae718aec7 100644--- a/app/models/TransactionJournal.php+++ b/app/models/TransactionJournal.php@@ -82,6 +82,15 @@ class TransactionJournal extends Eloquentreturn ['created_at', 'updated_at', 'date'];}+ public function getDescriptionAttribute($value)+ {+ if ($this->encrypted) {+ return Crypt::decrypt($value);+ }++ return $value;+ }+/*** @return \Illuminate\Database\Eloquent\Relations\HasMany*/@@ -198,6 +207,12 @@ class TransactionJournal extends Eloquent);}+ public function setDescriptionAttribute($value)+ {+ $this->attributes['description'] = Crypt::encrypt($value);+ $this->attributes['encrypted'] = true;+ }+/*** @return \Illuminate\Database\Eloquent\Relations\BelongsTo*/