supression icon si fichier non existant
This commit is contained in:
parent
d916b59f1c
commit
eedd7a786f
@ -258,6 +258,16 @@ class PurgeFileCommand extends Command
|
||||
}
|
||||
}
|
||||
|
||||
$directory=$this->container->get('kernel')->getRootDir()."/../web";
|
||||
$icons=$this->em->getRepository("CadolesPortalBundle:Icon")->findAll();
|
||||
foreach($icons as $icon) {
|
||||
if(!$fs->exists($directory."/".$icon->getLabel())) {
|
||||
$this->writeln($directory."/".$icon->getLabel());
|
||||
$this->em->remove($icon);
|
||||
$this->em->flush();
|
||||
}
|
||||
}
|
||||
|
||||
// /web/uploads/blogarticle
|
||||
$this->writelnred('');
|
||||
$this->writelnred('== Directory = Blog Article');
|
||||
|
Loading…
Reference in New Issue
Block a user