Changeset 11980

Show
Ignore:
Timestamp:
09/04/07 10:25:47 (1 year ago)
Author:
bergie
Message:

Deal with the funky RSS format provided by Hugin Online

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/midcom/net.nemein.rss/documentation/CHANGES

    r11591 r11980  
    66  which might even break existing functionality. 
    77- All items marked with "+" represent completly new features. 
     8 
     92007-09-04 bergie 
     10  + Added support for Hugin Online's funky RSS feeds 
    811 
    9122007-08-14 bergie 
  • trunk/midcom/net.nemein.rss/fetch.php

    r11598 r11980  
    778778                $item['description'] = $item['atom_content']; 
    779779            } 
    780         } 
     780            elseif (strpos($item['link'], 'cws.huginonline.com') !== false) 
     781            { 
     782                // Deal with the funky RSS format provided by Hugin Online 
     783                // Link points to actual news item in hexML format 
     784                $http_client = new org_openpsa_httplib(); 
     785                $news_xml = $http_client->get($item['link']); 
     786                $news = simplexml_load_string($news_xml); 
     787                if (isset($news->body->press_releases->press_release->main)) 
     788                { 
     789                    $item['description'] = (string) $news->body->press_releases->press_release->main; 
     790                } 
     791            } 
     792        } 
     793         
    781794        return $item; 
    782795    }