X-Git-Url: http://git.cyclocoop.org/?p=lhc%2Fweb%2Fclavette_www.git;a=blobdiff_plain;f=www%2Fplugins-dist%2Fsites%2Fgenie%2Fsyndic.php;h=ed8b5f154a0260ac6525316b1bda8bb2c553ddc1;hp=17f7789f11cc515de2de0077c1871d600429a70f;hb=cc641eb476987612f6d6df1a5417c1c5582a8ab8;hpb=7d84a490677fb716a1fd4df260f8eab35f6a8506;ds=sidebyside diff --git a/www/plugins-dist/sites/genie/syndic.php b/www/plugins-dist/sites/genie/syndic.php index 17f7789..ed8b5f1 100644 --- a/www/plugins-dist/sites/genie/syndic.php +++ b/www/plugins-dist/sites/genie/syndic.php @@ -3,7 +3,7 @@ /***************************************************************************\ * SPIP, Systeme de publication pour l'internet * * * - * Copyright (c) 2001-2014 * + * Copyright (c) 2001-2016 * * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribue sous licence GNU/GPL. * @@ -37,6 +37,7 @@ function executer_une_syndication() { // On va tenter un site 'sus' ou 'off' de plus de 24h, et le passer en 'off' // s'il echoue $where = sql_in("syndication", array('sus','off')) . " + AND statut<>'refuse' AND NOT(" . sql_date_proche('date_syndic', (0 - _PERIODE_SYNDICATION_SUSPENDUE) , "MINUTE") . ')'; $id_syndic = sql_getfetsel("id_syndic", "spip_syndic", $where, '', "date_syndic", "1"); if ($id_syndic) { @@ -46,6 +47,7 @@ function executer_une_syndication() { // Et un site 'oui' de plus de 2 heures, qui passe en 'sus' s'il echoue $where = "syndication='oui' + AND statut<>'refuse' AND NOT(" . sql_date_proche('date_syndic', (0 - _PERIODE_SYNDICATION) , "MINUTE") . ')'; $id_syndic = sql_getfetsel("id_syndic", "spip_syndic", $where, '', "date_syndic", "1"); @@ -266,8 +268,9 @@ function inserer_article_syndique ($data, $now_id_syndic, $statut, $url_site, $u // Mettre a jour la date si lastbuilddate if ($data['lastbuilddate']) $vals['date']= date("Y-m-d H:i:s", $data['lastbuilddate']); - - sql_updateq('spip_syndic_articles', $vals, "id_syndic_article=$id_syndic_article"); + + include_spip('inc/modifier'); + objet_modifier_champs('syndic_article',$id_syndic_article,array('data'=>$vals,'action'=>'syndiquer'),$vals); // Point d'entree post_syndication pipeline('post_syndication',