summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrédéric Guillot <fred@kanboard.net>2014-05-26 12:54:06 -0400
committerFrédéric Guillot <fred@kanboard.net>2014-05-26 12:54:06 -0400
commit93783274a438204a31865c848913088af96f0377 (patch)
tree0624ee61a42d20f55a765c4e1ef4cfa080aa0a83 /app
parent2cb6b77ac87c52e9655a1333d39d0263b4880ed5 (diff)
Improve automatic actions (move task to another position same columns)
Diffstat (limited to 'app')
-rw-r--r--app/Core/Event.php11
-rw-r--r--app/Model/Task.php2
2 files changed, 13 insertions, 0 deletions
diff --git a/app/Core/Event.php b/app/Core/Event.php
index ac81bf87..0e6df5e8 100644
--- a/app/Core/Event.php
+++ b/app/Core/Event.php
@@ -128,6 +128,17 @@ class Event
}
/**
+ * Flush the list of triggered events
+ *
+ * @access public
+ */
+ public function clearTriggeredEvents()
+ {
+ $this->events = array();
+ $this->lastEvent = '';
+ }
+
+ /**
* Check if a listener bind to an event
*
* @access public
diff --git a/app/Model/Task.php b/app/Model/Task.php
index 04500272..70f1404c 100644
--- a/app/Model/Task.php
+++ b/app/Model/Task.php
@@ -456,6 +456,8 @@ class Task extends Base
*/
public function move($task_id, $column_id, $position)
{
+ $this->event->clearTriggeredEvents();
+
return $this->update(array(
'id' => $task_id,
'column_id' => $column_id,