mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 16:13:54 +00:00
Fix some rule things.
This commit is contained in:
@@ -63,14 +63,6 @@ final class Processor
|
||||
Log::debug(sprintf('Making new rule from Rule %d', $rule->id));
|
||||
$self = new self;
|
||||
$self->rule = $rule;
|
||||
|
||||
/*
|
||||
* The number of "found triggers" must start at -1, because the first
|
||||
* trigger is "create-journal" or "update-journal" when this Processor
|
||||
* is called from a Rule.
|
||||
*/
|
||||
$self->setFoundTriggers(-1);
|
||||
|
||||
$triggerSet = $rule->ruleTriggers()->orderBy('order', 'ASC')->get();
|
||||
/** @var RuleTrigger $trigger */
|
||||
foreach ($triggerSet as $trigger) {
|
||||
@@ -189,7 +181,7 @@ final class Processor
|
||||
foreach ($this->actions as $action) {
|
||||
/** @var ActionInterface $actionClass */
|
||||
$actionClass = ActionFactory::getAction($action);
|
||||
Log::debug(sprintf('Fire action %s on journal #%d', $actionClass, $this->journal->id));
|
||||
Log::debug(sprintf('Fire action %s on journal #%d', get_class($actionClass), $this->journal->id));
|
||||
$actionClass->act($this->journal);
|
||||
if ($action->stop_processing) {
|
||||
Log::debug('Stop processing now and break.');
|
||||
@@ -212,6 +204,7 @@ final class Processor
|
||||
Log::debug('start of Processor::triggered()');
|
||||
$foundTriggers = $this->getFoundTriggers();
|
||||
$hitTriggers = 0;
|
||||
Log::debug(sprintf('Found triggers starts at %d', $foundTriggers));
|
||||
/** @var AbstractTrigger $trigger */
|
||||
foreach ($this->triggers as $trigger) {
|
||||
$foundTriggers++;
|
||||
|
Reference in New Issue
Block a user