resolution conflit

This commit is contained in:
Arnaud Fornerot 2020-09-02 11:48:45 +02:00
commit 8659a32942
2 changed files with 166 additions and 151 deletions

View File

@ -1004,7 +1004,14 @@ class PagewidgetController extends Controller
$logger = new \Psr\Log\NullLogger(); $logger = new \Psr\Log\NullLogger();
$feedIo = new \FeedIo\FeedIo($client, $logger); $feedIo = new \FeedIo\FeedIo($client, $logger);
try {
$result = $feedIo->read($url); $result = $feedIo->read($url);
}
catch (\Exception $e) {
$result=null;
}
if($result) {
$feedtitle = $result->getFeed()->getTitle(); $feedtitle = $result->getFeed()->getTitle();
@ -1085,6 +1092,7 @@ class PagewidgetController extends Controller
$filesystem->dumpFile($filecache, serialize($backup)); $filesystem->dumpFile($filecache, serialize($backup));
} }
} }
}
// Trie des fluxs // Trie des fluxs
$fluxsordered = $fluxs->getIterator(); $fluxsordered = $fluxs->getIterator();
@ -1218,7 +1226,14 @@ class PagewidgetController extends Controller
$feeds=array(); $feeds=array();
// On lit le flux rss // On lit le flux rss
try {
$result = $feedIo->read($url); $result = $feedIo->read($url);
}
catch (\Exception $e) {
$result=null;
}
if($result) {
$feedtitle = $result->getFeed()->getTitle(); $feedtitle = $result->getFeed()->getTitle();
@ -1295,6 +1310,7 @@ class PagewidgetController extends Controller
// On sauvegarde le résultat en fichier on rechargera son contenu que s'il n'a pas été lu depuis 30mn // On sauvegarde le résultat en fichier on rechargera son contenu que s'il n'a pas été lu depuis 30mn
$filesystem->dumpFile($filecache, serialize($feeds)); $filesystem->dumpFile($filecache, serialize($feeds));
} }
}
// Render // Render
return $this->render($this->labelentity.':viewflux.html.twig', [ return $this->render($this->labelentity.':viewflux.html.twig', [

View File

@ -56,7 +56,6 @@
{% set firstflux="" %} {% set firstflux="" %}
{% if fluxs is defined and fluxs is not empty %}
<div class="widgetbody" style="{{ stylewidgetbody }} "> <div class="widgetbody" style="{{ stylewidgetbody }} ">
{% if fluxs is defined %} {% if fluxs is defined %}
{% if fluxs|length > 1 %} {% if fluxs|length > 1 %}
@ -117,7 +116,7 @@
{% endfor %} {% endfor %}
</div> </div>
</div> </div>
{% endif %}
</div> </div>