X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=www%2Fecrire%2Finc%2Fsyndic.php;h=78c06e303577a7396cfbb96b369c1552d92bb2a0;hb=HEAD;hp=107a7ae899d0acb76e981d0eabab260b81a808b3;hpb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed;p=velocampus%2Fweb%2Fwww.git
diff --git a/www/ecrire/inc/syndic.php b/www/ecrire/inc/syndic.php
index 107a7ae..78c06e3 100644
--- a/www/ecrire/inc/syndic.php
+++ b/www/ecrire/inc/syndic.php
@@ -3,7 +3,7 @@
/***************************************************************************\
* SPIP, Systeme de publication pour l'internet *
* *
- * Copyright (c) 2001-2011 *
+ * Copyright (c) 2001-2014 *
* Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
* *
* Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
@@ -105,7 +105,7 @@ function analyser_backend($rss, $url_syndic='') {
else if (preg_match(',]*[[:space:]]rel=.alternate[^>]*>,Uims',
$item, $regs))
$data['url'] = extraire_attribut($regs[0], 'href');
- else if (preg_match(',]*>(.*),Uims', $item, $regs))
+ else if (preg_match(',]*>\s*([^\s]+)\s*,Uims', $item, $regs))
$data['url'] = $regs[1];
else if (preg_match(',]*>,Uims', $item, $regs))
$data['url'] = extraire_attribut($regs[0], 'href');
@@ -148,7 +148,8 @@ function analyser_backend($rss, $url_syndic='') {
// (note: ca pourrait etre defini site par site, mais ca risque d'etre
// plus lourd que vraiment utile)
if ($GLOBALS['controler_dates_rss']) {
- if ($la_date > time() + 48 * 3600)
+ if (!$la_date
+ OR $la_date > time() + 48 * 3600)
$la_date = time();
}