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

+17 -4
View File
@@ -369,6 +369,22 @@ class Post extends Comment implements Embeddable,
return TRUE;
}
/**
* Custom where conditions used specifically for finding comments
*
* @return array|null
*/
public static function findCommentWhere() : array|null
{
/* If we feature the first post, then pagination is all wrong */
if( Member::loggedIn()->getLayoutValue( 'forum_topic_view_firstpost' ) )
{
return [ 'new_topic=?', 0 ];
}
return parent::findCommentWhere();
}
/**
* [ActiveRecord] Save
@@ -398,10 +414,7 @@ class Post extends Comment implements Embeddable,
static::recordSync( $item );
}
}
catch( OutOfRangeException $e )
{
$item = NULL;
}
catch( OutOfRangeException $e ){}
parent::delete();
@@ -979,6 +979,18 @@ class Topic extends Item implements Embeddable,
$topic->state = 'closed';
}
}
if ( Bridge::i()->featureIsEnabled( 'realtime' ) )
{
$hash = [
'app' => 'forums',
'module' => 'forums',
'controller' => 'topic',
'id' => $topic->tid
];
Bridge::i()->addAdditionalLocation( $hash );
$topic->locationHash = Bridge::i()->getLocationHash( $hash );
}
}
if ( !empty( $openIds ) )