summaryrefslogtreecommitdiff
path: root/app/Action/Base.php
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2016-01-17 14:56:31 -0500
committerFrederic Guillot <fred@kanboard.net>2016-01-17 14:56:31 -0500
commite94c4cab7f79657f8b514b4af6c4e459e9b42961 (patch)
tree4986bdff7f1b1b401ff819642a1bab8d1d1c9a39 /app/Action/Base.php
parent1259e911e4316f9f1ae401f4f293da69d9ba9e78 (diff)
Avoid automatic actions that change the color to fire subsequent events
Diffstat (limited to 'app/Action/Base.php')
-rw-r--r--app/Action/Base.php19
1 files changed, 13 insertions, 6 deletions
diff --git a/app/Action/Base.php b/app/Action/Base.php
index 1298aec2..efc52f04 100644
--- a/app/Action/Base.php
+++ b/app/Action/Base.php
@@ -119,7 +119,13 @@ abstract class Base extends \Kanboard\Core\Base
*/
public function __toString()
{
- return $this->getName();
+ $params = array();
+
+ foreach ($this->params as $key => $value) {
+ $params[] = $key.'='.var_export($value, true);
+ }
+
+ return $this->getName().'('.implode('|', $params).'])';
}
/**
@@ -246,16 +252,17 @@ abstract class Base extends \Kanboard\Core\Base
}
$data = $event->getAll();
- $result = false;
+ $executable = $this->isExecutable($data, $eventName);
+ $executed = false;
- if ($this->isExecutable($data, $eventName)) {
+ if ($executable) {
$this->called = true;
- $result = $this->doAction($data);
+ $executed = $this->doAction($data);
}
- $this->logger->debug('AutomaticAction '.$this->getName().' => '.($result ? 'true' : 'false'));
+ $this->logger->debug($this.' ['.$eventName.'] => executable='.var_export($executable, true).' exec_success='.var_export($executed, true));
- return $result;
+ return $executed;
}
/**