Vérification magpie rss
This commit is contained in:
parent
f04a4f50e8
commit
21bf561294
@ -647,7 +647,7 @@ class IdentiteController extends Zend_Controller_Action
|
||||
$session = new SessionEntreprise($this->siret, $this->id);
|
||||
|
||||
$url = 'http://news.google.fr/news?hl=fr&ned=fr&q='.
|
||||
urlencode('"'.$session->getRaisonSociale().'"').'&output=rss';
|
||||
urlencode('"'.$session->getRaisonSociale().'"').'&output=rss';
|
||||
|
||||
define('MAGPIE_CACHE_ON', false);
|
||||
define('MAGPIE_OUTPUT_ENCODING', 'UTF-8');
|
||||
@ -655,8 +655,10 @@ class IdentiteController extends Zend_Controller_Action
|
||||
define('MAGPIE_DETECT_ENCODING', false);
|
||||
require_once ('Vendors/magpierss/rss_fetch.inc');
|
||||
$rss = fetch_rss($url);
|
||||
$items = array_slice($rss->items, 0, 15);
|
||||
|
||||
$items = array();
|
||||
if ($rss!==false){
|
||||
$items = array_slice($rss->items, 0, 15);
|
||||
}
|
||||
$this->view->assign('items', $items);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user