Commit 3d85e338 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Ajout de garde pour tester la présence des logos sur le HD

parent 91c74dba
Loading
Loading
Loading
Loading
+4 −1
Changes for module/Application/src/Application/Entity/Db/EcoleDoctorale.php: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -127,7 +127,10 @@ class EcoleDoctorale implements StructureConcreteInterface, HistoriqueAwareInter
            $image = Util::createImageWithText("Aucun logo pour l'ED|[" . $this->getSourceCode() . " - " . $this->getSigle() . "]", 200, 200);
            return $image;
        }
        //        return file_get_contents(APPLICATION_DIR . $this->getCheminLogo()) ?: null;
        if (!file_exists(Structure::PATH . $this->getCheminLogo())) {
            $image = Util::createImageWithText("Fichier absent sur le HD",200,200);
            return $image;
        }
        return file_get_contents( Structure::PATH . $this->getCheminLogo()) ?: null;
    }

+4
Changes for module/Application/src/Application/Entity/Db/Etablissement.php: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -249,6 +249,10 @@ class Etablissement implements StructureConcreteInterface, HistoriqueAwareInterf
            $image = Util::createImageWithText("Aucun logo pour l'Etab|" . $this->getSigle(), 200, 200);
            return $image;
        }
        if (!file_exists(Structure::PATH . $this->getCheminLogo())) {
            $image = Util::createImageWithText("Fichier absent sur le HD",200,200);
            return $image;
        }
        return file_get_contents( Structure::PATH . $this->getCheminLogo()) ?: null;
    }

+4
Changes for module/Application/src/Application/Entity/Db/UniteRecherche.php: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -142,6 +142,10 @@ class UniteRecherche implements StructureConcreteInterface, HistoriqueAwareInter
            $image = Util::createImageWithText("Aucun logo pour l'UR|[".$this->getSourceCode()." - ".$this->getSigle()."]",200,200);
            return $image;
        }
        if (!file_exists(Structure::PATH . $this->getCheminLogo())) {
            $image = Util::createImageWithText("Fichier absent sur le HD",200,200);
            return $image;
        }
        return file_get_contents( Structure::PATH . $this->getCheminLogo()) ?: null;

    }