Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

+13 -3
View File
@@ -67,7 +67,7 @@ class _Feed extends \IPS\Patterns\ActiveRecord
$i = 0;
$request = $request->decodeXml();
if( !( $request instanceof \IPS\Xml\RssOne ) AND !( $request instanceof \IPS\Xml\Rss ) AND !( $request instanceof \IPS\Xml\Atom ) )
if( !( $request instanceof \IPS\Xml\Rss1 ) AND !( $request instanceof \IPS\Xml\Rss ) AND !( $request instanceof \IPS\Xml\Atom ) )
{
throw new \RuntimeException( 'rss_import_invalid' );
}
@@ -76,6 +76,12 @@ class _Feed extends \IPS\Patterns\ActiveRecord
{
if ( !in_array( $guid, $previouslyImportedGuids ) )
{
/* Don't post entries in the future */
if( $article['date']->getTimestamp() > time() )
{
$article['date'] = \IPS\DateTime::create();
}
$entry = \IPS\blog\Entry::createItem( \IPS\Member::load( $this->member ), NULL, $article['date'], $container );
$entry->name = $article['title'];
$entry->content = \IPS\Text\Parser::parseStatic( $article['content'], TRUE );
@@ -100,7 +106,7 @@ class _Feed extends \IPS\Patterns\ActiveRecord
$linkRelPart = 'rel="' . implode($rel, ' ') . '"';
}
$link = htmlspecialchars( $this->import_show_link, ENT_QUOTES | \IPS\HTMLENTITIES, 'UTF-8', FALSE );
$link = htmlspecialchars( $this->import_show_link, ENT_QUOTES | ENT_DISALLOWED, 'UTF-8', FALSE );
$entry->content .= "<br><p><a href='{$article['link']}' {$linkRelPart}>{$link}</a></p>";
}
@@ -109,7 +115,11 @@ class _Feed extends \IPS\Patterns\ActiveRecord
/* Add to search index */
\IPS\Content\Search\Index::i()->index( $entry );
/* Send notifications */
$entry->sendNotifications();
$entry->setTags( json_decode( $this->tags, TRUE ) );
$inserts[] = array(