Loading module/Oscar/src/Oscar/Controller/ProjectGrantController.php +5 −2 Original line number Diff line number Diff line Loading @@ -1382,6 +1382,7 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif $project = null; } $organizationsCount = 0; if (!$this->getOscarUserContextService()->hasPrivileges(Privileges::ACTIVITY_CREATE)) { if (!$this->getOscarUserContextService()->hasPrivilegeInOrganizations( Privileges::ACTIVITY_CREATE Loading @@ -1391,7 +1392,8 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif $organisationsUser = $this->getOscarUserContextService()->getCurrentUserOrganisationWithPrivilege( Privileges::ACTIVITY_CREATE ); if (count($organisationsUser)) { $organizationsCount = count($organisationsUser); if ($organizationsCount) { $withOrganization = $organisationsUser; $rolesOrganizations = []; /** @var OrganizationRole $role */ Loading Loading @@ -1515,7 +1517,8 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif 'numerotationKeys' => $numerotationKeys, 'numbers_keys' => $numerotationKeys, 'allowNodeSelection' => $this->getOscarConfigurationService()->isAllowNodeSelection(), "tree" => $this->getPersonService()->getProjectGrantService()->getActivityTypesTree() "tree" => $this->getPersonService()->getProjectGrantService()->getActivityTypesTree(), 'organizationsCount' => $organizationsCount, ] ); Loading module/Oscar/src/Oscar/Entity/OrganizationRepository.php +1 −1 Original line number Diff line number Diff line Loading @@ -282,7 +282,7 @@ class OrganizationRepository extends EntityRepository implements IConnectedRepos $qb->select('o') ->from(Organization::class, 'o') ->where('o.connectors LIKE :search') ->setParameter('search', '%"' . $connector . '";s:' . strlen($value) . ':"' . $value . '";%'); ->setParameter('search', '%"' . $connector . '";s:' . strlen($value) . ':"' . str_replace('_', '\\_', $value) . '";%'); return $qb; } Loading module/Oscar/src/Oscar/Entity/PersonRepository.php +1 −1 Original line number Diff line number Diff line Loading @@ -418,7 +418,7 @@ class PersonRepository extends EntityRepository implements IConnectedRepository public function getPersonByConnectorQuery($connector, $value) { $qb = $this->getEntityManager()->createQueryBuilder(); $search = sprintf('s:%s:"%s";s:%s:"%s";', strlen($connector), $connector, strlen($value), $value); $search = sprintf('s:%s:"%s";s:%s:"%s";', strlen($connector), $connector, strlen($value), str_replace('_', '\\_', $value)); $qb->select('p') ->from(Person::class, 'p') ->where('p.connectors LIKE :search') Loading module/Oscar/view/oscar/project-grant/form.phtml +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ <p class="alert alert-danger"><?= $errorRoles ?></p> <?php endif; ?> <p class="alert alert-info"> <?= ngettext("Choisissez un rôle pour votre structure.", "Choisisser au moins un rôle pour une de vos structures", count($organizations)) ?><br> <?= ngettext("Choisissez un rôle pour votre structure.", "Choisisser au moins un rôle pour une de vos structures", $organizationsCount) ?><br> </p> <?php foreach ($withOrganization as $org): ?> <label for="organization[<?= $org->getId() ?>]"><?= $org ?></label> Loading Loading
module/Oscar/src/Oscar/Controller/ProjectGrantController.php +5 −2 Original line number Diff line number Diff line Loading @@ -1382,6 +1382,7 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif $project = null; } $organizationsCount = 0; if (!$this->getOscarUserContextService()->hasPrivileges(Privileges::ACTIVITY_CREATE)) { if (!$this->getOscarUserContextService()->hasPrivilegeInOrganizations( Privileges::ACTIVITY_CREATE Loading @@ -1391,7 +1392,8 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif $organisationsUser = $this->getOscarUserContextService()->getCurrentUserOrganisationWithPrivilege( Privileges::ACTIVITY_CREATE ); if (count($organisationsUser)) { $organizationsCount = count($organisationsUser); if ($organizationsCount) { $withOrganization = $organisationsUser; $rolesOrganizations = []; /** @var OrganizationRole $role */ Loading Loading @@ -1515,7 +1517,8 @@ class ProjectGrantController extends AbstractOscarController implements UseNotif 'numerotationKeys' => $numerotationKeys, 'numbers_keys' => $numerotationKeys, 'allowNodeSelection' => $this->getOscarConfigurationService()->isAllowNodeSelection(), "tree" => $this->getPersonService()->getProjectGrantService()->getActivityTypesTree() "tree" => $this->getPersonService()->getProjectGrantService()->getActivityTypesTree(), 'organizationsCount' => $organizationsCount, ] ); Loading
module/Oscar/src/Oscar/Entity/OrganizationRepository.php +1 −1 Original line number Diff line number Diff line Loading @@ -282,7 +282,7 @@ class OrganizationRepository extends EntityRepository implements IConnectedRepos $qb->select('o') ->from(Organization::class, 'o') ->where('o.connectors LIKE :search') ->setParameter('search', '%"' . $connector . '";s:' . strlen($value) . ':"' . $value . '";%'); ->setParameter('search', '%"' . $connector . '";s:' . strlen($value) . ':"' . str_replace('_', '\\_', $value) . '";%'); return $qb; } Loading
module/Oscar/src/Oscar/Entity/PersonRepository.php +1 −1 Original line number Diff line number Diff line Loading @@ -418,7 +418,7 @@ class PersonRepository extends EntityRepository implements IConnectedRepository public function getPersonByConnectorQuery($connector, $value) { $qb = $this->getEntityManager()->createQueryBuilder(); $search = sprintf('s:%s:"%s";s:%s:"%s";', strlen($connector), $connector, strlen($value), $value); $search = sprintf('s:%s:"%s";s:%s:"%s";', strlen($connector), $connector, strlen($value), str_replace('_', '\\_', $value)); $qb->select('p') ->from(Person::class, 'p') ->where('p.connectors LIKE :search') Loading
module/Oscar/view/oscar/project-grant/form.phtml +1 −1 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ <p class="alert alert-danger"><?= $errorRoles ?></p> <?php endif; ?> <p class="alert alert-info"> <?= ngettext("Choisissez un rôle pour votre structure.", "Choisisser au moins un rôle pour une de vos structures", count($organizations)) ?><br> <?= ngettext("Choisissez un rôle pour votre structure.", "Choisisser au moins un rôle pour une de vos structures", $organizationsCount) ?><br> </p> <?php foreach ($withOrganization as $org): ?> <label for="organization[<?= $org->getId() ?>]"><?= $org ?></label> Loading