Version 4.7.0

This commit is contained in:
Neo committed 2025-12-19 16:00:35 -08:00
1 parent 517a5e1f70
commit 8ba7d43898
1933 files changed
+65613 -11332

No files matched your search

+18 -2
View File
@@ -152,6 +152,22 @@ trait Reactable
$this->_reactions = NULL;
$this->hasReacted[ $member->member_id ] = $reaction;
if( \IPS\Application::appIsEnabled( 'cloud' ) and \IPS\cloud\Realtime::i()->isEnabled('realtime') )
{
$this->reactions();
\IPS\cloud\Realtime::i()->publishEvent( 'reaction-count', array('count' => $this->_reactionCount) );
}
if( \IPS\Application::appIsEnabled( 'cloud' ) and \IPS\cloud\Realtime::i()->isEnabled('trending') )
{
/* We need to make sure we're using the item */
$item = ( ! $this instanceof \IPS\Content\Item ) ? $this->item() : $this;
$itemIdColumn = $item::$databaseColumnId;
$itemId = $item->$itemIdColumn;
\IPS\Redis::i()->zIncrBy( 'trending', time() * 0.4, \get_class( $item ) .'__' . $itemId );
}
}
/**
@@ -426,9 +442,9 @@ trait Reactable
try
{
$class = $row['rep_class'];
$comment = $class::load( $row['type_id'] );
$item = $class::load( $row['type_id'] );
return \IPS\Member::loggedIn()->language()->addToStack( '_defart_from_date', NULL, array( 'htmlsprintf' => array( $comment->url(), $comment::$title, \IPS\DateTime::ts( $date )->html() ) ) );
return \IPS\Member::loggedIn()->language()->addToStack( '_defart_from_date', FALSE, array( 'htmlsprintf' => array( $item->url(), $item->mapped('title'), \IPS\DateTime::ts( $date )->html() ) ) );
}
catch( \Exception $e )
{