Make sure that some event subscribers are not executed multiple times
This commit is contained in:
@@ -6,17 +6,19 @@ use Kanboard\Event\TaskEvent;
|
||||
use Kanboard\Model\Task;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
class TransitionSubscriber extends \Kanboard\Core\Base implements EventSubscriberInterface
|
||||
class TransitionSubscriber extends BaseSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
public static function getSubscribedEvents()
|
||||
{
|
||||
return array(
|
||||
Task::EVENT_MOVE_COLUMN => array('execute', 0),
|
||||
Task::EVENT_MOVE_COLUMN => 'execute',
|
||||
);
|
||||
}
|
||||
|
||||
public function execute(TaskEvent $event)
|
||||
{
|
||||
$this->logger->debug('Subscriber executed: '.__CLASS__.'::'.__METHOD__);
|
||||
|
||||
$user_id = $this->userSession->getId();
|
||||
|
||||
if (! empty($user_id)) {
|
||||
|
||||
Reference in New Issue
Block a user