Version 4.7.13

This commit is contained in:
Neo committed 2025-12-19 16:14:56 -08:00
1 parent fd22d99e69
commit 7124a02564
954 files changed
+29277 -59308

No files matched your search

+17 -5
View File
@@ -240,7 +240,10 @@ abstract class _Comment extends \IPS\Content
if ( !$obj->hidden() and ( !$first or !$item::$firstCommentRequired ) )
{
$obj->sendNotifications();
$member->achievementAction( 'core', 'Comment', $obj );
if( !$item instanceof \IPS\core\Messenger\Conversation )
{
$member->achievementAction( 'core', 'Comment', $obj );
}
}
else if( $obj->hidden() === 1 )
{
@@ -467,7 +470,7 @@ abstract class _Comment extends \IPS\Content
{
\IPS\Redis::i()->zIncrBy( 'trending', time(), $class . '__' . $item->$itemIdColumn );
}
catch( \RedisException $e ) { }
catch( \BadMethodCallException | \RedisException $e ) { }
}
/* Was it moderated? Let's see why. */
@@ -626,7 +629,7 @@ abstract class _Comment extends \IPS\Content
return FALSE;
}
if ( $member->member_id )
if ( $member->member_id AND $this->canView( $member ) )
{
$item = $this->item();
@@ -1112,6 +1115,9 @@ abstract class _Comment extends \IPS\Content
{
\IPS\core\IndexNow::addUrlsToQueue( $noIndexUrls );
}
/* Remove from Hive */
\IPS\core\Hive::i()->removeContent( $this );
}
/**
@@ -1264,7 +1270,7 @@ abstract class _Comment extends \IPS\Content
/* Update last comment/review data for container and item */
try
{
if ( $item !== NULL AND \in_array( 'IPS\Content\Review', class_parents( \get_called_class() ) ) )
if ( $item !== NULL AND $item->container() !== NULL AND \in_array( 'IPS\Content\Review', class_parents( \get_called_class() ) ) )
{
if ( $item->container()->_reviews !== NULL )
{
@@ -1300,7 +1306,7 @@ abstract class _Comment extends \IPS\Content
}
/* Update mappings */
if ( \IPS\IPS::classUsesTrait( $item->container(), 'IPS\Node\Statistics' ) )
if ( $item !== NULL AND $item->container() !== NULL AND \IPS\IPS::classUsesTrait( $item->container(), 'IPS\Node\Statistics' ) )
{
$item->container()->rebuildPostedIn( array( $item->$itemIdColumn ), array( $this->author() ) );
}
@@ -1556,6 +1562,12 @@ abstract class _Comment extends \IPS\Content
}
}
/* Finally, we do not want posts from future items */
if ( \in_array( 'IPS\Content\FuturePublishing', class_implements( $itemClass ) ) )
{
$itemWhere[] = array( $itemClass::$databasePrefix . $itemClass::$databaseColumnMap['is_future_entry'] . '=0' );
}
if ( $joinContainer AND isset( $itemClass::$containerNodeClass ) )
{
$containerClass = $itemClass::$containerNodeClass;