Version 5.0.0 beta 6

This commit is contained in:
Neo committed 2025-12-19 17:12:27 -08:00
1 parent 57d9db6ce2
commit fa2a720105
115 files changed
+1823 -1147

No files matched your search

+12 -1
View File
@@ -16,6 +16,7 @@ use Exception;
use IPS\Application;
use IPS\Content;
use IPS\Content\Comment;
use IPS\Content\FuturePublishing;
use IPS\Content\Item;
use IPS\Content\Search\Elastic\MassIndexer;
use IPS\DateTime;
@@ -200,8 +201,18 @@ abstract class Index extends Singleton
return NULL;
}
/* If this is a comment on an item that uses future publishing AND the item is in the future, don't index */
if( $object instanceof Comment )
{
$item = $object->item();
if( $item::$firstCommentRequired and $object->isFirst() and IPS::classUsesTrait( $item, FuturePublishing::class ) and $item->isFutureDate() )
{
return null;
}
}
/* Don't index if this is an item to be published in the future */
if ( IPS::classUsesTrait( $object, 'IPS\Content\FuturePublishing' ) AND $object->isFutureDate() )
if ( IPS::classUsesTrait( $object, FuturePublishing::class ) AND $object->isFutureDate() )
{
return NULL;
}