Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 3bceec26 authored by NINASSI Benjamin's avatar NINASSI Benjamin
Browse files

upgrade of logs

parent 0d126592
No related branches found
No related tags found
No related merge requests found
......@@ -50,9 +50,18 @@ class VerifyStructuresLogoCommand extends ContainerAwareCommand
foreach ($structures as $structure) {
$logo = $structure->getLogo();
if($logo){
$exists = $this->is_url_exist($logo);
if(!$exists){
$logo_error_tab[]="Le logo ".$logo." n'existe pas (file not found) pour la structure <b>".$structure->getName()."</b>";
$code = $this->is_url_exist($logo);
if($code != "200"){
$logo_error_tab[]="Le logo ".$logo." n'a pas été trouvé ";
if($code == "404"){
$logo_error_tab[].= "(erreur 404 : file not found) ";
}else if($code == "200"){
$logo_error_tab[].= "(erreur 0 : le serveur est injoignable ?) ";
}else{
$logo_error_tab[].= "(erreur ".$code.") ";
}
$logo_error_tab[].= "pour la structure <b>".$structure->getName()."</b>";
}
}else{
$logo_error_tab[]="Pas de logo défini pour la structure <b>".$structure->getName()."</b>";
......@@ -106,13 +115,8 @@ class VerifyStructuresLogoCommand extends ContainerAwareCommand
\curl_exec($ch);
$code = \curl_getinfo($ch, CURLINFO_HTTP_CODE);
if($code == 200){
$status = true;
}else{
$status = false;
}
\curl_close($ch);
return $status;
return $code;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment