bugfix #178 - no more use of pear parser, just use php simplexml

Dieser Commit ist enthalten in:
Oldperl 2018-10-06 16:13:18 +00:00
Ursprung 1de9a295ee
Commit c0415492d2
1 geänderte Dateien mit 6 neuen und 8 gelöschten Zeilen

Datei anzeigen

@ -523,7 +523,7 @@ class Contenido_UpdateNotifier {
curl_close($ch);
}
} else {
$source = file_get_contents("http://" .$sHost . $sFile);
$source = file_get_contents("http://" . $sHost . $sFile);
if ($source !== false AND ! empty($source)) {
$response = $source;
}
@ -690,19 +690,17 @@ class Contenido_UpdateNotifier {
}
if ($this->sRSSContent != '') {
$temp = mb_convert_encoding( file_get_contents($this->sCacheDirectory . $this->sRSSFile), 'UTF-8', "ISO-8859-1" );
$oRss = simplexml_load_file($this->sCacheDirectory . $this->sRSSFile);
//$oRss->parse();
$iCnt = 0;
foreach ($oRss->channel->item as $aItem) {
//print_r($aItem);
$sText = clHtmlEntities(utf8_decode($aItem->description), ENT_QUOTES);
if (strlen($sText) > 150) {
$sText = capiStrTrimAfterWord($sText, 150) . '...';
}
$oTpl->set("d", "NEWS_DATE", $aItem->pubdate);
//echo $aItem->title;
$oTpl->set("d", "NEWS_DATE", $aItem->pubDate);
$oTpl->set("d", "NEWS_TITLE", utf8_decode($aItem->title));
$oTpl->set("d", "NEWS_TEXT", $sText);
$oTpl->set("d", "NEWS_URL", $aItem->link);