bugfix #178 - no more use of pear parser, just use php simplexml
Dieser Commit ist enthalten in:
Ursprung
1de9a295ee
Commit
c0415492d2
|
@ -418,7 +418,7 @@ class Contenido_UpdateNotifier {
|
||||||
|
|
||||||
if ($this->sXMLContent != "") {
|
if ($this->sXMLContent != "") {
|
||||||
$this->oXML = simplexml_load_string($this->sXMLContent);
|
$this->oXML = simplexml_load_string($this->sXMLContent);
|
||||||
if ($this->oXML === false || !is_object($this->oXML)) {
|
if ($this->oXML === false || !is_object($this->oXML)) {
|
||||||
$sErrorMessage = i18n('Unable to check for new updates!') . " " . i18n('Could not handle server response!');
|
$sErrorMessage = i18n('Unable to check for new updates!') . " " . i18n('Could not handle server response!');
|
||||||
$this->sErrorOutput = $this->renderOutput($sErrorMessage);
|
$this->sErrorOutput = $this->renderOutput($sErrorMessage);
|
||||||
} else {
|
} else {
|
||||||
|
@ -523,7 +523,7 @@ class Contenido_UpdateNotifier {
|
||||||
curl_close($ch);
|
curl_close($ch);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$source = file_get_contents("http://" .$sHost . $sFile);
|
$source = file_get_contents("http://" . $sHost . $sFile);
|
||||||
if ($source !== false AND ! empty($source)) {
|
if ($source !== false AND ! empty($source)) {
|
||||||
$response = $source;
|
$response = $source;
|
||||||
}
|
}
|
||||||
|
@ -690,19 +690,17 @@ class Contenido_UpdateNotifier {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->sRSSContent != '') {
|
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 = simplexml_load_file($this->sCacheDirectory . $this->sRSSFile);
|
|
||||||
|
|
||||||
//$oRss->parse();
|
|
||||||
|
|
||||||
$iCnt = 0;
|
$iCnt = 0;
|
||||||
foreach ($oRss->channel->item as $aItem) {
|
foreach ($oRss->channel->item as $aItem) {
|
||||||
|
//print_r($aItem);
|
||||||
$sText = clHtmlEntities(utf8_decode($aItem->description), ENT_QUOTES);
|
$sText = clHtmlEntities(utf8_decode($aItem->description), ENT_QUOTES);
|
||||||
if (strlen($sText) > 150) {
|
if (strlen($sText) > 150) {
|
||||||
$sText = capiStrTrimAfterWord($sText, 150) . '...';
|
$sText = capiStrTrimAfterWord($sText, 150) . '...';
|
||||||
}
|
}
|
||||||
|
//echo $aItem->title;
|
||||||
$oTpl->set("d", "NEWS_DATE", $aItem->pubdate);
|
$oTpl->set("d", "NEWS_DATE", $aItem->pubDate);
|
||||||
$oTpl->set("d", "NEWS_TITLE", utf8_decode($aItem->title));
|
$oTpl->set("d", "NEWS_TITLE", utf8_decode($aItem->title));
|
||||||
$oTpl->set("d", "NEWS_TEXT", $sText);
|
$oTpl->set("d", "NEWS_TEXT", $sText);
|
||||||
$oTpl->set("d", "NEWS_URL", $aItem->link);
|
$oTpl->set("d", "NEWS_URL", $aItem->link);
|
||||||
|
|
Laden…
In neuem Issue referenzieren