Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
Renamed a table, added a bug fix.
James Cole32ef2ef8017c
diff --git a/app/config/packages/rcrowe/twigbridge/extensions.php b/app/config/packages/rcrowe/twigbridge/extensions.phpdeleted file mode 100644index 8f99eb097e..0000000000--- a/app/config/packages/rcrowe/twigbridge/extensions.php+++ /dev/null@@ -1,134 +0,0 @@-<?php--/**- * This file is part of the TwigBridge package.- *- * @copyright Robert Crowe <[email protected]>- *- * For the full copyright and license information, please view the LICENSE- * file that was distributed with this source code.- */--/**- * Configuration options for the built-in extensions.- */-return [-- /*- |--------------------------------------------------------------------------- | Extensions- |--------------------------------------------------------------------------- |- | Enabled extensions.- |- | `Twig_Extension_Debug` is enabled automatically if twig.debug is TRUE.- |- */- 'enabled' => [- 'TwigBridge\Extension\Loader\Facades',- 'TwigBridge\Extension\Loader\Filters',- 'TwigBridge\Extension\Loader\Functions',-- 'TwigBridge\Extension\Laravel\Auth',- 'TwigBridge\Extension\Laravel\Config',- 'TwigBridge\Extension\Laravel\Form',- 'TwigBridge\Extension\Laravel\Html',- 'TwigBridge\Extension\Laravel\Input',- 'TwigBridge\Extension\Laravel\Session',- 'TwigBridge\Extension\Laravel\String',- 'TwigBridge\Extension\Laravel\Translator',- 'TwigBridge\Extension\Laravel\Url',-- // 'TwigBridge\Extension\Laravel\Legacy\Facades',- ],-- /*- |--------------------------------------------------------------------------- | Facades- |--------------------------------------------------------------------------- |- | Available facades. Access like `{{ Config.get('foo.bar') }}`.- |- | Each facade can take an optional array of options. To mark the whole facade- | as safe you can set the option `'is_safe' => true`. Setting the facade as- | safe means that any HTML returned will not be escaped.- |- | It is advisable to not set the whole facade as safe and instead mark the- | each appropriate method as safe for security reasons. You can do that with- | the following syntax:- |- | <code>- | 'Form' => [- | 'is_safe' => [- | 'open'- | ]- | ]- | </code>- |- | The values of the `is_safe` array must match the called method on the facade- | in order to be marked as safe.- |- */- 'facades' => [],-- /*- |--------------------------------------------------------------------------- | Functions- |--------------------------------------------------------------------------- |- | Available functions. Access like `{{ secure_url(...) }}`.- |- | Each function can take an optional array of options. These options are- | passed directly to `Twig_SimpleFunction`.- |- | So for example, to mark a function as safe you can do the following:- |- | <code>- | 'link_to' => [- | 'is_safe' => ['html']- | ]- | </code>- |- | The options array also takes a `callback` that allows you to name the- | function differently in your Twig templates than what it's actually called.- |- | <code>- | 'link' => [- | 'callback' => 'link_to'- | ]- | </code>- |- */- 'functions' => [],-- /*- |--------------------------------------------------------------------------- | Filters- |--------------------------------------------------------------------------- |- | Available filters. Access like `{{ variable|filter }}`.- |- | Each filter can take an optional array of options. These options are- | passed directly to `Twig_SimpleFilter`.- |- | So for example, to mark a filter as safe you can do the following:- |- | <code>- | 'studly_case' => [- | 'is_safe' => ['html']- | ]- | </code>- |- | The options array also takes a `callback` that allows you to name the- | filter differently in your Twig templates than what is actually called.- |- | <code>- | 'snake' => [- | 'callback' => 'snake_case'- | ]- | </code>- |- */- 'filters' => [],--];diff --git a/app/config/packages/rcrowe/twigbridge/twig.php b/app/config/packages/rcrowe/twigbridge/twig.phpdeleted file mode 100644index 343e9e1e14..0000000000--- a/app/config/packages/rcrowe/twigbridge/twig.php+++ /dev/null@@ -1,88 +0,0 @@-<?php--/**- * This file is part of the TwigBridge package.- *- * @copyright Robert Crowe <[email protected]>- *- * For the full copyright and license information, please view the LICENSE- * file that was distributed with this source code.- */--use Illuminate\Support\Facades\Config;--/**- * Configuration options for Twig.- */-return [-- /*- |--------------------------------------------------------------------------- | Extension- |--------------------------------------------------------------------------- |- | File extension for Twig view files.- |- */- 'extension' => 'twig',-- /*- |--------------------------------------------------------------------------- | Accepts all Twig environment configuration options- |--------------------------------------------------------------------------- |- | http://twig.sensiolabs.org/doc/api.html#environment-options- |- */- 'environment' => [-- // When set to true, the generated templates have a __toString() method- // that you can use to display the generated nodes.- // default: false- 'debug' => Config::get('app.debug', false),-- // The charset used by the templates.- // default: utf-8- 'charset' => 'utf-8',-- // The base template class to use for generated templates.- // default: TwigBridge\Twig\Template- 'base_template_class' => 'TwigBridge\Twig\Template',-- // An absolute path where to store the compiled templates, or false to disable caching. If null- // then the cache file path is used.- // default: cache file storage path- 'cache' => null,-- // When developing with Twig, it's useful to recompile the template- // whenever the source code changes. If you don't provide a value- // for the auto_reload option, it will be determined automatically based on the debug value.- 'auto_reload' => true,-- // If set to false, Twig will silently ignore invalid variables- // (variables and or attributes/methods that do not exist) and- // replace them with a null value. When set to true, Twig throws an exception instead.- // default: false- 'strict_variables' => false,-- // If set to true, auto-escaping will be enabled by default for all templates.- // default: true- 'autoescape' => true,-- // A flag that indicates which optimizations to apply- // (default to -1 -- all optimizations are enabled; set it to 0 to disable)- 'optimizations' => -1,- ],-- /*- |--------------------------------------------------------------------------- | Global variables- |--------------------------------------------------------------------------- |- | These will always be passed in and can be accessed as Twig variables.- | NOTE: these will be overwritten if you pass data into the view with the same key.- |- */- 'globals' => [],--];diff --git a/app/controllers/PiggybankController.php b/app/controllers/PiggybankController.phpindex 59c746ba03..dae4f03113 100644--- a/app/controllers/PiggybankController.php+++ b/app/controllers/PiggybankController.php@@ -321,6 +321,7 @@ class PiggybankController extends BaseController$data['rep_every'] = 0;$data['reminder_skip'] = 0;$data['order'] = 0;+ $data['remind_me'] = isset($data['remind_me']) ? 1 : 0;switch (Input::get('post_submit_action')) {default:diff --git a/app/database/migrations/2014_12_13_190730_changes_for_v321.php b/app/database/migrations/2014_12_13_190730_changes_for_v321.phpindex b93ac1f9a2..11aaaa8d14 100644--- a/app/database/migrations/2014_12_13_190730_changes_for_v321.php+++ b/app/database/migrations/2014_12_13_190730_changes_for_v321.php@@ -17,9 +17,10 @@ class ChangesForV321 extends Migration*/public function down(){- Schema::rename('budget_limits','limits');+ Schema::rename('budget_limits', 'limits');+ Schema::rename('piggy_bank_events', 'piggybank_events');DB::update(DB::raw('ALTER TABLE `limit_repetitions` ALGORITHM=INPLACE, CHANGE `budget_limit_id` `limit_id` INT UNSIGNED NOT NULL'));- DB::update(DB::Raw('ALTER TABLE `transactions` ADD `piggybank_id` int(10) unsigned DEFAULT NULL AFTER `account_id`;'));+ DB::update(DB::Raw('ALTER TABLE `transactions` ADD `piggybank_id` INT(10) UNSIGNED DEFAULT NULL AFTER `account_id`;'));}/**@@ -29,9 +30,10 @@ class ChangesForV321 extends Migration*/public function up(){- Schema::rename('limits','budget_limits');+ Schema::rename('limits', 'budget_limits');DB::update(DB::raw('ALTER TABLE `limit_repetitions` ALGORITHM=INPLACE, CHANGE `limit_id` `budget_limit_id` INT UNSIGNED NOT NULL'));DB::update(DB::Raw('ALTER TABLE `transactions` DROP `piggybank_id`'));+ Schema::rename('piggybank_events', 'piggy_bank_events');}diff --git a/app/lib/FireflyIII/Event/Piggybank.php b/app/lib/FireflyIII/Event/Piggybank.phpindex 6d1541ec15..bdc067259f 100644--- a/app/lib/FireflyIII/Event/Piggybank.php+++ b/app/lib/FireflyIII/Event/Piggybank.php@@ -21,7 +21,7 @@ class Piggybankpublic function addMoney(\Piggybank $piggybank, $amount = 0.0){if ($amount > 0) {- $event = new \PiggybankEvent;+ $event = new \PiggyBankEvent;$event->piggybank()->associate($piggybank);$event->amount = floatval($amount);$event->date = new Carbon;@@ -67,7 +67,7 @@ class Piggybank$repetition->save();- $event = new \PiggybankEvent;+ $event = new \PiggyBankEvent;$event->piggybank()->associate($piggyBank);$event->amount = floatval($relevantTransaction->amount * -1);$event->date = new Carbon;@@ -83,7 +83,7 @@ class Piggybank{$amount = $amount * -1;if ($amount < 0) {- $event = new \PiggybankEvent;+ $event = new \PiggyBankEvent;$event->piggybank()->associate($piggybank);$event->amount = floatval($amount);$event->date = new Carbon;@@ -170,7 +170,7 @@ class Piggybank$repetition->currentamount += floatval($relevantTransaction->amount);$repetition->save();- $event = new \PiggybankEvent;+ $event = new \PiggyBankEvent;$event->piggybank()->associate($piggyBank);$event->transactionjournal()->associate($journal);$event->amount = floatval($relevantTransaction->amount);@@ -316,7 +316,7 @@ class Piggybank$repetition->save();- $event = new \PiggybankEvent;+ $event = new \PiggyBankEvent;$event->piggybank()->associate($piggyBank);$event->transactionJournal()->associate($journal);$event->amount = $diff;diff --git a/app/models/PiggybankEvent.php b/app/models/PiggybankEvent.phpindex fda32062e0..bda9f3f55c 100644--- a/app/models/PiggybankEvent.php+++ b/app/models/PiggybankEvent.php@@ -2,18 +2,18 @@use Watson\Validating\ValidatingTrait;/**- * Class PiggybankEvent+ * Class PiggyBankEvent*/-class PiggybankEvent extends Eloquent+class PiggyBankEvent extends Eloquent{- use ValidatingTrait;public static $rules= ['piggybank_id' => 'required|exists:piggybanks,id','date' => 'required|date','amount' => 'required|numeric'];+ use ValidatingTrait;/*** @return array