Commit fb2d100c authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Fix : Mode strict par défaut pour le PFI pour les anciennes configuration

parent 7763def4
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ class OscarDataControlPFICommand extends OscarAdvancedCommandAbstract
            $format = "<red>%s</red>";
        }
        $this->getIO()->writeln("Mode strict : <bold>" .($strict ? "<green>OUI</green>" : "<red>non</red>") . "</bold>");
        $regex = $this->getOscarConfigurationService()->getPfiRegex();
        $regex = $this->getOscarConfigurationService()->getValidationPFI();
        $this->getIO()->writeln("Regex : <bold>" . $regex . "</bold>");


+5 −1
Original line number Diff line number Diff line
@@ -43,7 +43,11 @@ class OscarConfigurationService implements ServiceLocatorAwareInterface
     */
    public function isPfiStrict() :bool
    {
        return $this->getEditableConfKey(self::pfi_strict, false);
        $new = $this->getEditableConfKey(self::pfi_strict, null);
        if( $new == null ){
            return true;
        }
        return $new;
    }

    /**
+1 −0
Original line number Diff line number Diff line
@@ -1615,6 +1615,7 @@ class PersonService implements UseOscarConfigurationService, UseEntityManager, U
                        $filters['ids'] = $ids;
                    }
                } catch (\Exception $e) {
                    die("what ??? " . $e->getMessage());
                    $this->getLoggerService()->error(
                        sprintf("Méthode de recherche des personnes non-disponible : %s", $e->getMessage())
                    );
+0 −2
Original line number Diff line number Diff line
@@ -178,8 +178,6 @@ class ProjectGrantService implements UseGearmanJobLauncherService, UseOscarConfi
            'valid' => false
        ];

        $regex = $this->getOscarConfigurationService()->getPfiRegex();

        $pfi = $this->getActivityRepository()->getDistinctPFI();
        foreach ($pfi as $pfiTested) {
            if( $pfiTested == "" ) continue;