Cleanup and fixes

This commit is contained in:
Frédéric Guillot
2015-01-02 21:48:26 -05:00
parent 45c95d74fc
commit 0ebdd4ddfd
11 changed files with 24 additions and 33 deletions

View File

@@ -44,13 +44,13 @@ class NotificationSubscriber extends Base implements EventSubscriberInterface
);
}
public function execute(GenericEvent $event)
public function execute(GenericEvent $event, $event_name)
{
$values = $this->getTemplateData($event);
$users = $this->notification->getUsersList($values['task']['project_id']);
if ($users) {
$this->notification->sendEmails($this->templates[$event->getName()], $users, $values);
$this->notification->sendEmails($this->templates[$event_name], $users, $values);
}
}

View File

@@ -27,7 +27,7 @@ class ProjectActivitySubscriber extends Base implements EventSubscriberInterface
);
}
public function execute(GenericEvent $event)
public function execute(GenericEvent $event, $event_name)
{
// Executed only when someone is logged
if ($this->userSession->isLogged() && isset($event['task_id'])) {
@@ -38,7 +38,7 @@ class ProjectActivitySubscriber extends Base implements EventSubscriberInterface
$values['task']['project_id'],
$values['task']['id'],
$this->userSession->getId(),
$event->getName(),
$event_name,
$values
);
}