refresh cache rss après modification (fixes #16)
This commit is contained in:
parent
ba54065443
commit
5c85fbb034
|
@ -128,6 +128,11 @@ class FluxController extends Controller
|
|||
$em->persist($data);
|
||||
$em->flush();
|
||||
|
||||
// On supprime le potentiel cache de ce flux
|
||||
$dir = $this->container->getParameter('kernel.root_dir').'/../web/uploads/flux/';
|
||||
$mask = $dir."flux-*".$data->getId().".*";
|
||||
array_map( "unlink", glob( $mask ) );
|
||||
|
||||
// Retour à la liste
|
||||
return $this->redirectToRoute($this->labelroute);
|
||||
}
|
||||
|
|
|
@ -212,6 +212,14 @@ class PagewidgetController extends Controller
|
|||
$em->persist($entity);
|
||||
$em->flush();
|
||||
|
||||
// Si widget RSS On supprime le potentiel cache de ce flux
|
||||
if($entity->getWidget()->getId()==-1880) {
|
||||
$dir = $this->container->getParameter('kernel.root_dir').'/../web/uploads/flux/';
|
||||
$mask = $dir."widget-".$entity->getId().".*";
|
||||
array_map( "unlink", glob( $mask ) );
|
||||
}
|
||||
|
||||
// Retour
|
||||
if($by=="view")
|
||||
return $this->redirect($this->generateUrl('cadoles_portal_'.$access.'_page_view',["id"=>$idpage,"usage"=>$usage,"group"=>$group]));
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue