Version 4.1.2

This commit is contained in:
Neo committed 2025-12-19 05:32:19 -08:00
1 parent 3ba79295ee
commit 28bd025b35
1131 files changed
+63658 -20579

No files matched your search

+21 -5
View File
@@ -44,19 +44,35 @@ class _Atom extends SimpleXML
$articles = array();
foreach ( $this->entry as $item )
{
{
$link = NULL;
if ( isset( $item->link ) )
{
try
/* Links are object nodes with attributes we need to parse - try to find the right link */
$linkToCheck = NULL;
foreach( $item->link as $_link )
{
$link = \IPS\Http\Url::external( $item->link );
$attributes = $_link->attributes();
if( !isset( $attributes['rel'] ) OR ( isset( $attributes['rel'] ) AND $attributes['rel'] == 'alternate' ) )
{
$linkToCheck = $attributes['href'];
break;
}
}
if( $linkToCheck )
{
try
{
$link = \IPS\Http\Url::external( $linkToCheck );
}
catch ( \Exception $e ) { }
}
catch ( \Exception $e ) { }
}
$articles[ md5( $guidKey . ( (string) $item->id ) ) ] = array(
'title' => (string) $item->title,
'title' => ( (string) $item->title ) ?: ( mb_substr( strip_tags( $item->content ), 0, 47 ) . '...' ),
'content' => isset( $item->content ) ? (string) $item->content : (string) $item->title,
'date' => \IPS\DateTime::ts( strtotime( $item->updated ) ),
'link' => $link