diff --git a/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/PurgeFileCommand.php b/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/PurgeFileCommand.php index 1e62bac3..02bd32f1 100644 --- a/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/PurgeFileCommand.php +++ b/src/ninegate-1.0/src/Cadoles/CoreBundle/Command/PurgeFileCommand.php @@ -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');