/[drupal]/contributions/modules/fooaggregator/parsers/simplexml/fa_simplexml.module
ViewVC logotype

Diff of /contributions/modules/fooaggregator/parsers/simplexml/fa_simplexml.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.11, Sun Jun 8 20:43:17 2008 UTC revision 1.1.2.12, Thu Sep 25 00:49:23 2008 UTC
# Line 1  Line 1 
1  <?php // -*-php-*-  <?php // -*-php-*-
2  /* $Id: fa_simplexml.module,v 1.1.2.10 2007/11/24 14:04:38 alaa Exp $ */  /* $Id: fa_simplexml.module,v 1.1.2.11 2008/06/08 20:43:17 alaa Exp $ */
3    
4  /**  /**
5   * Implementation of hook_fooaggregatorapi()   * Implementation of hook_fooaggregatorapi()
# Line 175  function _fa_simplexml_parse_item(&$item Line 175  function _fa_simplexml_parse_item(&$item
175      $node['enclosures'] = (string) $item->enclosure['url'];      $node['enclosures'] = (string) $item->enclosure['url'];
176      break;      break;
177    case 'feed' /* atom */:    case 'feed' /* atom */:
178      $node['link'] = (string) $item->link['href'];      //items can have multiple links
179        if (count($item->link) > 1) {
180          foreach ($item->link as $link) {
181            if ((string) $link['rel'] == 'alternate') {
182              $node['link'] = (string) $link['href'];
183              break;
184            }
185          }
186        } else {
187          $node['link'] = (string) $item->link['href'];
188        }
189      $node['body'] = $item->content ? (string) $item->content : (string) $item->summary;      $node['body'] = $item->content ? (string) $item->content : (string) $item->summary;
190      $node['guid'] = (string) $item->id;      $node['guid'] = (string) $item->id;
191      $node['date'] = $item->published ? (string) $item->published :  $item->issued ? (string) $item->issued : $item->created ? (string) $item->created : $item->updated ? (string) $item->updated : (string) $item->modified;      $node['date'] = $item->published ? (string) $item->published :  $item->issued ? (string) $item->issued : $item->created ? (string) $item->created : $item->updated ? (string) $item->updated : (string) $item->modified;

Legend:
Removed from v.1.1.2.11  
changed lines
  Added in v.1.1.2.12

  ViewVC Help
Powered by ViewVC 1.1.2