Version 4.6.0

This commit is contained in:
Neo committed 2025-12-19 05:55:31 -08:00
1 parent f79dcf067a
commit 517a5e1f70
2036 files changed
+110041 -26162

No files matched your search

+14 -4
View File
@@ -21,7 +21,7 @@ if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
/**
* Post Model
*/
class _Comment extends \IPS\Content\Comment implements \IPS\Content\EditHistory, \IPS\Content\Hideable, \IPS\Content\Shareable, \IPS\Content\Searchable, \IPS\Content\Embeddable
class _Comment extends \IPS\Content\Comment implements \IPS\Content\EditHistory, \IPS\Content\Hideable, \IPS\Content\Shareable, \IPS\Content\Searchable, \IPS\Content\Embeddable, \IPS\Content\Anonymous
{
use \IPS\Content\Reactable, \IPS\Content\Reportable;
@@ -76,6 +76,7 @@ class _Comment extends \IPS\Content\Comment implements \IPS\Content\EditHistory,
'edit_member_id' => 'edit_member_id',
'edit_reason' => 'edit_reason',
'approved' => 'approved',
'is_anon' => 'is_anon'
# 'first' => 'new_topic'
);
@@ -133,9 +134,18 @@ class _Comment extends \IPS\Content\Comment implements \IPS\Content\EditHistory,
* @param \IPS\Member $member The memner
* @return int
*/
public static function memberPostCount( \IPS\Member $member )
public static function memberPostCount( \IPS\Member $member, bool $includeNonPostCountIncreasing = FALSE, bool $includeHiddenAndPendingApproval = TRUE )
{
return \IPS\Db::i()->select( 'COUNT(*)', static::$databaseTable, array( 'comment_database_id=? AND comment_user=?', static::$customDatabaseId, $member->member_id ) )->first();
$where = [];
$where[] = [ 'comment_database_id=?', static::$customDatabaseId ];
$where[] = [ 'comment_user=?', $member->member_id ];
if ( !$includeHiddenAndPendingApproval )
{
$where[] = [ 'comment_approved=1' ];
}
return \IPS\Db::i()->select( 'COUNT(*)', static::$databaseTable, $where )->first();
}
/**
@@ -191,7 +201,7 @@ class _Comment extends \IPS\Content\Comment implements \IPS\Content\EditHistory,
* @param array $reactions Reaction Data
* @return string
*/
public static function searchResult( array $indexData, array $authorData, array $itemData, array $containerData = NULL, array $reputationData, $reviewRating, $iPostedIn, $view, $asItem, $canIgnoreComments=FALSE, $template=NULL, $reactions=array() )
public static function searchResult( array $indexData, array $authorData, array $itemData, ?array $containerData, array $reputationData, $reviewRating, $iPostedIn, $view, $asItem, $canIgnoreComments=FALSE, $template=NULL, $reactions=array() )
{
/* Ensure that the comment title is formatted correctly */
try