~maj v3.0.19-->v3.0.21
[ptitvelo/web/www.git] / www / plugins-dist / sites / genie / syndic.php
index 41d346b..eb47437 100644 (file)
@@ -21,7 +21,7 @@ if (!defined('_PERIODE_SYNDICATION_SUSPENDUE'))
        define('_PERIODE_SYNDICATION_SUSPENDUE', 24*60);
 
 
-// http://doc.spip.org/@genie_syndic_dist
+// http://code.spip.net/@genie_syndic_dist
 function genie_syndic_dist($t) {
        return executer_une_syndication();
 }
@@ -31,12 +31,13 @@ function genie_syndic_dist($t) {
 // retourne 0 si aucun a faire ou echec lors de la tentative
 //
 
-// http://doc.spip.org/@executer_une_syndication
+// http://code.spip.net/@executer_une_syndication
 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");
 
@@ -64,7 +66,7 @@ function executer_une_syndication() {
  * sur un meme site: un verrouillage a du etre pose en amont.
  * => elle doit toujours etre appelee par job_queue_add
  *
- * http://doc.spip.org/@syndic_a_jour
+ * http://code.spip.net/@syndic_a_jour
  *
  * @param int $now_id_syndic
  * @return bool|string
@@ -141,7 +143,7 @@ function syndic_a_jour($now_id_syndic) {
 // en  verifiant qu'on ne vient pas de l'ecrire avec
 // un autre item du meme feed qui aurait le meme link
 //
-// http://doc.spip.org/@inserer_article_syndique
+// http://code.spip.net/@inserer_article_syndique
 function inserer_article_syndique ($data, $now_id_syndic, $statut, $url_site, $url_syndic, $resume, $documents, &$faits) {
        // Creer le lien s'il est nouveau - cle=(id_syndic,url)
        // On coupe a 255 caracteres pour eviter tout doublon