Commit 4211fe1f authored by Bertrand Gauthier's avatar Bertrand Gauthier Committed by Thomas Hamel
Browse files

Recherche textuelle d'individu : suppression du critère type=acteur puisqu'il...

Recherche textuelle d'individu : suppression du critère type=acteur puisqu'il existe des ActeurThese et ActeurHDR.
parent ac69c81e
Loading
Loading
Loading
Loading
+0 −3
Changes for module/Individu/src/Individu/Entity/Db/Individu.php: 0 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -33,9 +33,6 @@ class Individu implements
    const CIVILITE_M = 'M.';
    const CIVILITE_MME = 'Mme';

    /** @deprecated La colonne 'individu.type' n'est pas fiable, il faut l'abandonner */
    const TYPE_ACTEUR = 'acteur';
    /** @deprecated La colonne 'individu.type' n'est pas fiable, il faut l'abandonner */
    const TYPE_DOCTORANT = 'doctorant';

    /**
+1 −4
Changes for module/Individu/src/Individu/Entity/Db/Repository/IndividuRepository.php: 1 added line, 4 removed lines.
Original line number Diff line number Diff line
@@ -76,13 +76,10 @@ class IndividuRepository extends DefaultEntityRepository
            "JOIN INDIVIDU_RECH ir on ir.id = i.id " .
            "JOIN SOURCE src on src.id = i.source_id " .
            "left join doctorant id on id.individu_id = i.id and id.histo_destruction is null " .
            "left join acteur ia on ia.individu_id = i.id and ia.histo_destruction is null " .
            "WHERE i.HISTO_DESTRUCTION IS NULL";

        if ($type !== null) {
            if ($type === Individu::TYPE_ACTEUR) {
                $sql .= sprintf(" AND (i.type = '%s' or ia.id is not null)", $type);
            } elseif ($type === Individu::TYPE_DOCTORANT) {
            if ($type === Individu::TYPE_DOCTORANT) {
                $sql .= sprintf(" AND (i.type = '%s' or id.id is not null)", $type);
            } else {
                $sql .= sprintf(" AND i.type = '%s'", $type);
+1 −1
Changes for module/These/src/These/Fieldset/Encadrement/EncadrementFieldsetFactory.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ class EncadrementFieldsetFactory
        /** @var PhpRenderer $renderer*/
        $renderer = $container->get('ViewRenderer');
        /** @see IndividuController::rechercherAction() */
        $fieldset->setUrlCoEncadrant($renderer->url('individu/rechercher', [], ["query" => ['type' => Individu::TYPE_ACTEUR]], true));
        $fieldset->setUrlCoEncadrant($renderer->url('individu/rechercher', [], [], true));
        $fieldset->setObject(new These());

        return $fieldset;