mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 11:03:50 +00:00
cs: Enable a couple of risky rules.
This commit is contained in:
@@ -187,7 +187,7 @@ class SingleTaskRepository extends EntityRepository
|
||||
$this->buildACLQuery($qb, $currentUser);
|
||||
}
|
||||
|
||||
if (array_key_exists('person', $params) and !empty($params['person'])) {
|
||||
if (array_key_exists('person', $params) && !empty($params['person'])) {
|
||||
$qb->andWhere($qb->expr()->eq('st.person', ':person'));
|
||||
$qb->setParameter('person', $params['person']);
|
||||
} elseif (array_key_exists('center', $params)) {
|
||||
@@ -200,8 +200,8 @@ class SingleTaskRepository extends EntityRepository
|
||||
}
|
||||
}
|
||||
|
||||
if (array_key_exists('unassigned', $params) and true === $params['unassigned']) {
|
||||
if (array_key_exists('user', $params) and !empty($params['user'])) {
|
||||
if (array_key_exists('unassigned', $params) && true === $params['unassigned']) {
|
||||
if (array_key_exists('user', $params) && !empty($params['user'])) {
|
||||
throw new UnexpectedValueException('You should not require for '
|
||||
. 'unassigned tasks and tasks assigned to some user.');
|
||||
}
|
||||
@@ -209,12 +209,12 @@ class SingleTaskRepository extends EntityRepository
|
||||
$qb->andWhere($qb->expr()->isNull('st.assignee'));
|
||||
}
|
||||
|
||||
if (array_key_exists('user', $params) and !empty($params['user'])) {
|
||||
if (array_key_exists('user', $params) && !empty($params['user'])) {
|
||||
$qb->andWhere($qb->expr()->eq('st.assignee', ':user'));
|
||||
$qb->setParameter('user', $params['user']);
|
||||
}
|
||||
|
||||
if (array_key_exists('scope', $params) and !empty($params['scope'])) {
|
||||
if (array_key_exists('scope', $params) && !empty($params['scope'])) {
|
||||
$qb->andWhere($qb->expr()->eq('st.circle', ':scope'));
|
||||
$qb->setParameter('scope', $params['scope']);
|
||||
}
|
||||
@@ -226,7 +226,7 @@ class SingleTaskRepository extends EntityRepository
|
||||
}
|
||||
}
|
||||
|
||||
if (array_key_exists('date_status', $params) and !empty($params['date_status'])) {
|
||||
if (array_key_exists('date_status', $params) && !empty($params['date_status'])) {
|
||||
$this->addTypeFilter($qb, $params);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user