| 1 |
<?php // -*-php-*- |
<?php // -*-php-*- |
| 2 |
/* $Id: fa_simplexml.module,v 1.1.2.12 2008/09/25 00:49:23 alaa Exp $ */ |
/* $Id: fa_simplexml.module,v 1.1.2.13 2008/10/17 09:33:34 alaa Exp $ */ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Implementation of hook_fooaggregatorapi() |
* Implementation of hook_fooaggregatorapi() |
| 54 |
@ $parsed_xml = simplexml_load_string($xml, NULL, LIBXML_NOERROR | LIBXML_NOWARNING); |
@ $parsed_xml = simplexml_load_string($xml, NULL, LIBXML_NOERROR | LIBXML_NOWARNING); |
| 55 |
} |
} |
| 56 |
} |
} |
| 57 |
$error = libxml_get_last_error(); |
if ($parsed_xml === FALSE || $parsed_xml == NULL) { |
| 58 |
$message = t('Failed to parse %title, %error', array('%title' => $feed->title, '%error' => $error->message)); |
$error = libxml_get_last_error(); |
| 59 |
_fooaggregator_log_error($message); |
$message = t('Failed to parse %title, %error', array('%title' => $feed->title, '%error' => $error->message)); |
| 60 |
$xml = null; |
_fooaggregator_log_error($message); |
| 61 |
return false; |
$xml = null; |
| 62 |
|
return false; |
| 63 |
|
} |
| 64 |
} |
} |
| 65 |
|
|
| 66 |
_fa_simplexml_update_feed_info($feed, $parsed_xml); |
_fa_simplexml_update_feed_info($feed, $parsed_xml); |