Version 5.0.13

This commit is contained in:
Neo committed 2025-12-19 19:04:57 -08:00
1 parent b89858b2ff
commit 5efe744c5f
1407 files changed
+69690 -30177

No files matched your search

+26
View File
@@ -103,10 +103,29 @@ trait ItemTopic
try
{
$topic = Topic::load( $this->$column );
if ( $topic->isArchived() )
{
/* Do not update archived topics */
return;
}
/* If this is a future publish date, make sure we update that as well */
if( IPS::classUsesTrait( $this, FuturePublishing::class ) and $topic->isFutureDate() )
{
$topic->start_date = $this->mapped( 'date' );
$topic->is_future_entry = $this->isFutureDate();
$topic->publish_date = $this->mapped( 'future_date' );
}
$title = $this->getTopicTitle();
Member::loggedIn()->language()->parseOutputForDisplay( $title );
$topic->title = $title;
$topic->save();
/* Synch the last comment data in case timestamps have changed */
$topic->resyncLastComment();
$firstPost = $topic->comments( 1 );
/* If the first post of the topic is missing, NULL will be returned */
@@ -118,6 +137,7 @@ trait ItemTopic
$content = $this->getTopicContent();
Member::loggedIn()->language()->parseOutputForDisplay( $content );
$firstPost->post = $content;
$firstPost->post_date = $topic->start_date;
$firstPost->save();
Index::i()->index( $firstPost );
}
@@ -181,6 +201,12 @@ trait ItemTopic
$topic->sendNotifications();
}
/* Check our auto-follow settings */
if( $topic->author()->auto_follow['content'] )
{
$topic->follow( $topic->author()->auto_follow['method'], !$this->isAnonymous(), $topic->author() );
}
/* Update file */
$this->$column = $topic->tid;
$this->save();