Changeset 109735 in spip-zone


Ignore:
Timestamp:
Mar 30, 2018, 4:02:59 PM (20 months ago)
Author:
cedric@…
Message:

Utiliser recuperer_url plutot que le deprecie recuperer_page

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _core_/plugins/sites/inc/syndic.php

    r109734 r109735  
    3838        // Aller chercher les donnees du RSS et les analyser
    3939        include_spip('inc/distant');
    40         $rss = recuperer_page($url_syndic, true);
    41         if (!$rss) {
    42                 $articles = _T('sites:avis_echec_syndication_02');
     40        $res = recuperer_url($url_syndic, array('transcoder' => true));
     41        if (!$res
     42          or !$res['page']
     43          or intval($res['status']/100) != 2) {
     44                $items = _T('sites:avis_echec_syndication_02');
    4345        } else {
    44                 $articles = analyser_backend($rss, $url_syndic);
    45         }
    46 
    47         return $articles;
     46                $items = analyser_backend($res['page'], $url_syndic);
     47        }
     48
     49        return $items;
    4850}
    4951
Note: See TracChangeset for help on using the changeset viewer.