Various fixes for PHPAnalyzer
This commit is contained in:
@@ -10,6 +10,7 @@ use Pimple\Container;
|
|||||||
* @package auth
|
* @package auth
|
||||||
* @author Frederic Guillot
|
* @author Frederic Guillot
|
||||||
*
|
*
|
||||||
|
* @property \Core\Session $session
|
||||||
* @property \Model\Acl $acl
|
* @property \Model\Acl $acl
|
||||||
* @property \Model\LastLogin $lastLogin
|
* @property \Model\LastLogin $lastLogin
|
||||||
* @property \Model\User $user
|
* @property \Model\User $user
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class GitHub extends Base
|
|||||||
{
|
{
|
||||||
$user = $this->user->getByGitHubId($github_id);
|
$user = $this->user->getByGitHubId($github_id);
|
||||||
|
|
||||||
if ($user) {
|
if (! empty($user)) {
|
||||||
$this->userSession->refresh($user);
|
$this->userSession->refresh($user);
|
||||||
$this->container['dispatcher']->dispatch('auth.success', new AuthEvent(self::AUTH_NAME, $user['id']));
|
$this->container['dispatcher']->dispatch('auth.success', new AuthEvent(self::AUTH_NAME, $user['id']));
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class Google extends Base
|
|||||||
{
|
{
|
||||||
$user = $this->user->getByGoogleId($google_id);
|
$user = $this->user->getByGoogleId($google_id);
|
||||||
|
|
||||||
if ($user) {
|
if (! empty($user)) {
|
||||||
$this->userSession->refresh($user);
|
$this->userSession->refresh($user);
|
||||||
$this->container['dispatcher']->dispatch('auth.success', new AuthEvent(self::AUTH_NAME, $user['id']));
|
$this->container['dispatcher']->dispatch('auth.success', new AuthEvent(self::AUTH_NAME, $user['id']));
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ class Ldap extends Base
|
|||||||
|
|
||||||
$user = $this->user->getByUsername($username);
|
$user = $this->user->getByUsername($username);
|
||||||
|
|
||||||
if ($user) {
|
if (! empty($user)) {
|
||||||
|
|
||||||
// There is already a local user with that name
|
// There is already a local user with that name
|
||||||
if ($user['is_ldap_user'] == 0) {
|
if ($user['is_ldap_user'] == 0) {
|
||||||
@@ -241,7 +241,7 @@ class Ldap extends Base
|
|||||||
}
|
}
|
||||||
|
|
||||||
// User id not retrieved: LDAP_ACCOUNT_ID not properly configured
|
// User id not retrieved: LDAP_ACCOUNT_ID not properly configured
|
||||||
if (! $username && ! isset($info[0][LDAP_ACCOUNT_ID][0])) {
|
if (empty($username) && ! isset($info[0][LDAP_ACCOUNT_ID][0])) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class ReverseProxy extends Base
|
|||||||
$login = $_SERVER[REVERSE_PROXY_USER_HEADER];
|
$login = $_SERVER[REVERSE_PROXY_USER_HEADER];
|
||||||
$user = $this->user->getByUsername($login);
|
$user = $this->user->getByUsername($login);
|
||||||
|
|
||||||
if (! $user) {
|
if (empty($user)) {
|
||||||
$this->createUser($login);
|
$this->createUser($login);
|
||||||
$user = $this->user->getByUsername($login);
|
$user = $this->user->getByUsername($login);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ class Action extends Base
|
|||||||
$project = $this->getProject();
|
$project = $this->getProject();
|
||||||
$action = $this->action->getById($this->request->getIntegerParam('action_id'));
|
$action = $this->action->getById($this->request->getIntegerParam('action_id'));
|
||||||
|
|
||||||
if ($action && $this->action->remove($action['id'])) {
|
if (! empty($action) && $this->action->remove($action['id'])) {
|
||||||
$this->session->flash(t('Action removed successfully.'));
|
$this->session->flash(t('Action removed successfully.'));
|
||||||
} else {
|
} else {
|
||||||
$this->session->flashError(t('Unable to remove this action.'));
|
$this->session->flashError(t('Unable to remove this action.'));
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ use Symfony\Component\EventDispatcher\Event;
|
|||||||
* @property \Model\ProjectActivity $projectActivity
|
* @property \Model\ProjectActivity $projectActivity
|
||||||
* @property \Model\ProjectDailySummary $projectDailySummary
|
* @property \Model\ProjectDailySummary $projectDailySummary
|
||||||
* @property \Model\Subtask $subtask
|
* @property \Model\Subtask $subtask
|
||||||
|
* @property \Model\SubtaskForecast $subtaskForecast
|
||||||
* @property \Model\Swimlane $swimlane
|
* @property \Model\Swimlane $swimlane
|
||||||
* @property \Model\Task $task
|
* @property \Model\Task $task
|
||||||
* @property \Model\Link $link
|
* @property \Model\Link $link
|
||||||
@@ -336,7 +337,7 @@ abstract class Base
|
|||||||
{
|
{
|
||||||
$task = $this->taskFinder->getDetails($this->request->getIntegerParam('task_id'));
|
$task = $this->taskFinder->getDetails($this->request->getIntegerParam('task_id'));
|
||||||
|
|
||||||
if (! $task) {
|
if (empty($task)) {
|
||||||
$this->notfound();
|
$this->notfound();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -355,7 +356,7 @@ abstract class Base
|
|||||||
$project_id = $this->request->getIntegerParam('project_id', $project_id);
|
$project_id = $this->request->getIntegerParam('project_id', $project_id);
|
||||||
$project = $this->project->getById($project_id);
|
$project = $this->project->getById($project_id);
|
||||||
|
|
||||||
if (! $project) {
|
if (empty($project)) {
|
||||||
$this->session->flashError(t('Project not found.'));
|
$this->session->flashError(t('Project not found.'));
|
||||||
$this->response->redirect('?controller=project');
|
$this->response->redirect('?controller=project');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,7 +117,7 @@ class Board extends Base
|
|||||||
$project = $this->project->getByToken($token);
|
$project = $this->project->getByToken($token);
|
||||||
|
|
||||||
// Token verification
|
// Token verification
|
||||||
if (! $project) {
|
if (empty($project)) {
|
||||||
$this->forbidden(true);
|
$this->forbidden(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -311,7 +311,7 @@ class Board extends Base
|
|||||||
$this->checkCSRFParam();
|
$this->checkCSRFParam();
|
||||||
$column = $this->board->getColumn($this->request->getIntegerParam('column_id'));
|
$column = $this->board->getColumn($this->request->getIntegerParam('column_id'));
|
||||||
|
|
||||||
if ($column && $this->board->removeColumn($column['id'])) {
|
if (! empty($column) && $this->board->removeColumn($column['id'])) {
|
||||||
$this->session->flash(t('Column removed successfully.'));
|
$this->session->flash(t('Column removed successfully.'));
|
||||||
} else {
|
} else {
|
||||||
$this->session->flashError(t('Unable to remove this column.'));
|
$this->session->flashError(t('Unable to remove this column.'));
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class Category extends Base
|
|||||||
{
|
{
|
||||||
$category = $this->category->getById($this->request->getIntegerParam('category_id'));
|
$category = $this->category->getById($this->request->getIntegerParam('category_id'));
|
||||||
|
|
||||||
if (! $category) {
|
if (empty($category)) {
|
||||||
$this->session->flashError(t('Category not found.'));
|
$this->session->flashError(t('Category not found.'));
|
||||||
$this->response->redirect('?controller=category&action=index&project_id='.$project_id);
|
$this->response->redirect('?controller=category&action=index&project_id='.$project_id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class Comment extends Base
|
|||||||
{
|
{
|
||||||
$comment = $this->comment->getById($this->request->getIntegerParam('comment_id'));
|
$comment = $this->comment->getById($this->request->getIntegerParam('comment_id'));
|
||||||
|
|
||||||
if (! $comment) {
|
if (empty($comment)) {
|
||||||
$this->notfound();
|
$this->notfound();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ class Link extends Base
|
|||||||
{
|
{
|
||||||
$link = $this->link->getById($this->request->getIntegerParam('link_id'));
|
$link = $this->link->getById($this->request->getIntegerParam('link_id'));
|
||||||
|
|
||||||
if (! $link) {
|
if (empty($link)) {
|
||||||
$this->notfound();
|
$this->notfound();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ class Subtask extends Base
|
|||||||
{
|
{
|
||||||
$subtask = $this->subtask->getById($this->request->getIntegerParam('subtask_id'));
|
$subtask = $this->subtask->getById($this->request->getIntegerParam('subtask_id'));
|
||||||
|
|
||||||
if (! $subtask) {
|
if (empty($subtask)) {
|
||||||
$this->notfound();
|
$this->notfound();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class Swimlane extends Base
|
|||||||
{
|
{
|
||||||
$swimlane = $this->swimlane->getById($this->request->getIntegerParam('swimlane_id'));
|
$swimlane = $this->swimlane->getById($this->request->getIntegerParam('swimlane_id'));
|
||||||
|
|
||||||
if (! $swimlane) {
|
if (empty($swimlane)) {
|
||||||
$this->session->flashError(t('Swimlane not found.'));
|
$this->session->flashError(t('Swimlane not found.'));
|
||||||
$this->response->redirect('?controller=swimlane&action=index&project_id='.$project_id);
|
$this->response->redirect('?controller=swimlane&action=index&project_id='.$project_id);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,13 +22,13 @@ class Task extends Base
|
|||||||
$project = $this->project->getByToken($this->request->getStringParam('token'));
|
$project = $this->project->getByToken($this->request->getStringParam('token'));
|
||||||
|
|
||||||
// Token verification
|
// Token verification
|
||||||
if (! $project) {
|
if (empty($project)) {
|
||||||
$this->forbidden(true);
|
$this->forbidden(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
$task = $this->taskFinder->getDetails($this->request->getIntegerParam('task_id'));
|
$task = $this->taskFinder->getDetails($this->request->getIntegerParam('task_id'));
|
||||||
|
|
||||||
if (! $task) {
|
if (empty($task)) {
|
||||||
$this->notfound(true);
|
$this->notfound(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class Tasklink extends Base
|
|||||||
{
|
{
|
||||||
$link = $this->taskLink->getById($this->request->getIntegerParam('link_id'));
|
$link = $this->taskLink->getById($this->request->getIntegerParam('link_id'));
|
||||||
|
|
||||||
if (! $link) {
|
if (empty($link)) {
|
||||||
$this->notfound();
|
$this->notfound();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ class User extends Base
|
|||||||
{
|
{
|
||||||
$user = $this->user->getById($this->request->getIntegerParam('user_id'));
|
$user = $this->user->getById($this->request->getIntegerParam('user_id'));
|
||||||
|
|
||||||
if (! $user) {
|
if (empty($user)) {
|
||||||
$this->notfound();
|
$this->notfound();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ use Pimple\Container;
|
|||||||
* @package integration
|
* @package integration
|
||||||
* @author Frederic Guillot
|
* @author Frederic Guillot
|
||||||
*
|
*
|
||||||
|
* @property \Model\ProjectActivity $projectActivity
|
||||||
* @property \Model\Task $task
|
* @property \Model\Task $task
|
||||||
* @property \Model\TaskFinder $taskFinder
|
* @property \Model\TaskFinder $taskFinder
|
||||||
* @property \Model\User $user
|
* @property \Model\User $user
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ class BitbucketWebhook extends Base
|
|||||||
|
|
||||||
$task = $this->taskFinder->getById($task_id);
|
$task = $this->taskFinder->getById($task_id);
|
||||||
|
|
||||||
if (! $task) {
|
if (empty($task)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ class GithubWebhook extends Base
|
|||||||
|
|
||||||
$task = $this->taskFinder->getById($task_id);
|
$task = $this->taskFinder->getById($task_id);
|
||||||
|
|
||||||
if (! $task) {
|
if (empty($task)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ class GithubWebhook extends Base
|
|||||||
$task = $this->taskFinder->getByReference($payload['issue']['number']);
|
$task = $this->taskFinder->getByReference($payload['issue']['number']);
|
||||||
$user = $this->user->getByUsername($payload['comment']['user']['login']);
|
$user = $this->user->getByUsername($payload['comment']['user']['login']);
|
||||||
|
|
||||||
if ($task && $user) {
|
if (! empty($task) && ! empty($user)) {
|
||||||
|
|
||||||
$event = array(
|
$event = array(
|
||||||
'project_id' => $this->project_id,
|
'project_id' => $this->project_id,
|
||||||
@@ -198,7 +198,7 @@ class GithubWebhook extends Base
|
|||||||
{
|
{
|
||||||
$task = $this->taskFinder->getByReference($issue['number']);
|
$task = $this->taskFinder->getByReference($issue['number']);
|
||||||
|
|
||||||
if ($task) {
|
if (! empty($task)) {
|
||||||
$event = array(
|
$event = array(
|
||||||
'project_id' => $this->project_id,
|
'project_id' => $this->project_id,
|
||||||
'task_id' => $task['id'],
|
'task_id' => $task['id'],
|
||||||
@@ -227,7 +227,7 @@ class GithubWebhook extends Base
|
|||||||
{
|
{
|
||||||
$task = $this->taskFinder->getByReference($issue['number']);
|
$task = $this->taskFinder->getByReference($issue['number']);
|
||||||
|
|
||||||
if ($task) {
|
if (! empty($task)) {
|
||||||
$event = array(
|
$event = array(
|
||||||
'project_id' => $this->project_id,
|
'project_id' => $this->project_id,
|
||||||
'task_id' => $task['id'],
|
'task_id' => $task['id'],
|
||||||
@@ -257,7 +257,7 @@ class GithubWebhook extends Base
|
|||||||
$user = $this->user->getByUsername($issue['assignee']['login']);
|
$user = $this->user->getByUsername($issue['assignee']['login']);
|
||||||
$task = $this->taskFinder->getByReference($issue['number']);
|
$task = $this->taskFinder->getByReference($issue['number']);
|
||||||
|
|
||||||
if ($user && $task) {
|
if (! empty($user) && ! empty($task)) {
|
||||||
|
|
||||||
$event = array(
|
$event = array(
|
||||||
'project_id' => $this->project_id,
|
'project_id' => $this->project_id,
|
||||||
@@ -288,7 +288,7 @@ class GithubWebhook extends Base
|
|||||||
{
|
{
|
||||||
$task = $this->taskFinder->getByReference($issue['number']);
|
$task = $this->taskFinder->getByReference($issue['number']);
|
||||||
|
|
||||||
if ($task) {
|
if (! empty($task)) {
|
||||||
|
|
||||||
$event = array(
|
$event = array(
|
||||||
'project_id' => $this->project_id,
|
'project_id' => $this->project_id,
|
||||||
@@ -320,7 +320,7 @@ class GithubWebhook extends Base
|
|||||||
{
|
{
|
||||||
$task = $this->taskFinder->getByReference($issue['number']);
|
$task = $this->taskFinder->getByReference($issue['number']);
|
||||||
|
|
||||||
if ($task) {
|
if (! empty($task)) {
|
||||||
|
|
||||||
$event = array(
|
$event = array(
|
||||||
'project_id' => $this->project_id,
|
'project_id' => $this->project_id,
|
||||||
@@ -352,7 +352,7 @@ class GithubWebhook extends Base
|
|||||||
{
|
{
|
||||||
$task = $this->taskFinder->getByReference($issue['number']);
|
$task = $this->taskFinder->getByReference($issue['number']);
|
||||||
|
|
||||||
if ($task) {
|
if (! empty($task)) {
|
||||||
|
|
||||||
$event = array(
|
$event = array(
|
||||||
'project_id' => $this->project_id,
|
'project_id' => $this->project_id,
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ class GitlabWebhook extends Base
|
|||||||
|
|
||||||
$task = $this->taskFinder->getById($task_id);
|
$task = $this->taskFinder->getById($task_id);
|
||||||
|
|
||||||
if (! $task) {
|
if (empty($task)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -193,7 +193,7 @@ class GitlabWebhook extends Base
|
|||||||
{
|
{
|
||||||
$task = $this->taskFinder->getByReference($issue['id']);
|
$task = $this->taskFinder->getByReference($issue['id']);
|
||||||
|
|
||||||
if ($task) {
|
if (! empty($task)) {
|
||||||
$event = array(
|
$event = array(
|
||||||
'project_id' => $this->project_id,
|
'project_id' => $this->project_id,
|
||||||
'task_id' => $task['id'],
|
'task_id' => $task['id'],
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class Hipchat extends Base
|
|||||||
* @param integer $project_id Project id
|
* @param integer $project_id Project id
|
||||||
* @param integer $task_id Task id
|
* @param integer $task_id Task id
|
||||||
* @param string $event_name Event name
|
* @param string $event_name Event name
|
||||||
* @param array $data Event data
|
* @param array $event Event data
|
||||||
*/
|
*/
|
||||||
public function notify($project_id, $task_id, $event_name, array $event)
|
public function notify($project_id, $task_id, $event_name, array $event)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class SlackWebhook extends Base
|
|||||||
* @param integer $project_id Project id
|
* @param integer $project_id Project id
|
||||||
* @param integer $task_id Task id
|
* @param integer $task_id Task id
|
||||||
* @param string $event_name Event name
|
* @param string $event_name Event name
|
||||||
* @param array $data Event data
|
* @param array $event Event data
|
||||||
*/
|
*/
|
||||||
public function notify($project_id, $task_id, $event_name, array $event)
|
public function notify($project_id, $task_id, $event_name, array $event)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -213,7 +213,7 @@ class Action extends Base
|
|||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param array $values Required parameters to save an action
|
* @param array $values Required parameters to save an action
|
||||||
* @return integer
|
* @return boolean|integer
|
||||||
*/
|
*/
|
||||||
public function create(array $values)
|
public function create(array $values)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -44,6 +44,10 @@ use Pimple\Container;
|
|||||||
* @property \Model\TaskPosition $taskPosition
|
* @property \Model\TaskPosition $taskPosition
|
||||||
* @property \Model\TaskValidator $taskValidator
|
* @property \Model\TaskValidator $taskValidator
|
||||||
* @property \Model\Timetable $timetable
|
* @property \Model\Timetable $timetable
|
||||||
|
* @property \Model\TimetableDay $timetableDay
|
||||||
|
* @property \Model\TimetableExtra $timetableExtra
|
||||||
|
* @property \Model\TimetableOff $timetableOfff
|
||||||
|
* @property \Model\TimetableWeek $timetableWeek
|
||||||
* @property \Model\SubtaskTimeTracking $subtaskTimeTracking
|
* @property \Model\SubtaskTimeTracking $subtaskTimeTracking
|
||||||
* @property \Model\User $user
|
* @property \Model\User $user
|
||||||
* @property \Model\UserSession $userSession
|
* @property \Model\UserSession $userSession
|
||||||
|
|||||||
@@ -62,10 +62,8 @@ class Timetable extends Base
|
|||||||
* Get a serie of events based on the timetable and the provided event
|
* Get a serie of events based on the timetable and the provided event
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
* @param integer $user_id
|
* @param array $event
|
||||||
* @param array $events Time tracking data
|
* @param array $timetable
|
||||||
* @param string $start ISO8601 date
|
|
||||||
* @param string $end ISO8601 date
|
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
public function calculateEventIntersect(array $event, array $timetable)
|
public function calculateEventIntersect(array $event, array $timetable)
|
||||||
|
|||||||
@@ -162,6 +162,7 @@ function version_49($pdo)
|
|||||||
$pdo->exec('ALTER TABLE subtasks ADD COLUMN position INTEGER DEFAULT 1');
|
$pdo->exec('ALTER TABLE subtasks ADD COLUMN position INTEGER DEFAULT 1');
|
||||||
|
|
||||||
$task_id = 0;
|
$task_id = 0;
|
||||||
|
$position = 1;
|
||||||
$urq = $pdo->prepare('UPDATE subtasks SET position=? WHERE id=?');
|
$urq = $pdo->prepare('UPDATE subtasks SET position=? WHERE id=?');
|
||||||
|
|
||||||
$rq = $pdo->prepare('SELECT * FROM subtasks ORDER BY task_id, id ASC');
|
$rq = $pdo->prepare('SELECT * FROM subtasks ORDER BY task_id, id ASC');
|
||||||
|
|||||||
@@ -155,6 +155,7 @@ function version_30($pdo)
|
|||||||
$pdo->exec('ALTER TABLE subtasks ADD COLUMN position INTEGER DEFAULT 1');
|
$pdo->exec('ALTER TABLE subtasks ADD COLUMN position INTEGER DEFAULT 1');
|
||||||
|
|
||||||
$task_id = 0;
|
$task_id = 0;
|
||||||
|
$position = 1;
|
||||||
$urq = $pdo->prepare('UPDATE subtasks SET position=? WHERE id=?');
|
$urq = $pdo->prepare('UPDATE subtasks SET position=? WHERE id=?');
|
||||||
|
|
||||||
$rq = $pdo->prepare('SELECT * FROM subtasks ORDER BY task_id, id ASC');
|
$rq = $pdo->prepare('SELECT * FROM subtasks ORDER BY task_id, id ASC');
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ function version_48($pdo)
|
|||||||
// Migrate all subtasks position
|
// Migrate all subtasks position
|
||||||
|
|
||||||
$task_id = 0;
|
$task_id = 0;
|
||||||
|
$position = 1;
|
||||||
$urq = $pdo->prepare('UPDATE subtasks SET position=? WHERE id=?');
|
$urq = $pdo->prepare('UPDATE subtasks SET position=? WHERE id=?');
|
||||||
|
|
||||||
$rq = $pdo->prepare('SELECT * FROM subtasks ORDER BY task_id, id ASC');
|
$rq = $pdo->prepare('SELECT * FROM subtasks ORDER BY task_id, id ASC');
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ use Pimple\Container;
|
|||||||
* @package subscriber
|
* @package subscriber
|
||||||
* @author Frederic Guillot
|
* @author Frederic Guillot
|
||||||
*
|
*
|
||||||
|
* @property \Integration\SlackWebhook $slackWebhook
|
||||||
|
* @property \Integration\Hipchat $hipchat
|
||||||
* @property \Model\Board $board
|
* @property \Model\Board $board
|
||||||
* @property \Model\Config $config
|
* @property \Model\Config $config
|
||||||
* @property \Model\Comment $comment
|
* @property \Model\Comment $comment
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ class NotificationSubscriber extends Base implements EventSubscriberInterface
|
|||||||
$values = $this->getTemplateData($event);
|
$values = $this->getTemplateData($event);
|
||||||
$users = $this->notification->getUsersList($values['task']['project_id']);
|
$users = $this->notification->getUsersList($values['task']['project_id']);
|
||||||
|
|
||||||
if ($users) {
|
if (! empty($users)) {
|
||||||
$this->notification->sendEmails($this->templates[$event_name], $users, $values);
|
$this->notification->sendEmails($this->templates[$event_name], $users, $values);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user