Version 4.3.0

This commit is contained in:
Neo committed 2025-12-19 05:47:12 -08:00
1 parent 96997ddd8e
commit fe1acf984a
1349 files changed
+116159 -67711

No files matched your search

@@ -133,17 +133,45 @@ class _CommentTopicSync extends \IPS\cms\Records\Comment
$comment->editContents( $newContent );
}
/**
* Get HTML
*
* @return string
*/
public function html()
{
if ( ! empty( $this->pid ) )
{
try
{
$comment = \IPS\forums\Topic\Post::load( $this->pid );
$template = static::$commentTemplate[1];
static::$commentTemplate[0][0] = $this->item()->database()->template_display;
return call_user_func_array( array( \IPS\cms\Theme::i(), 'getTemplate' ), static::$commentTemplate[0] )->$template( $comment->item(), $comment );
}
catch( \OutOfRangeException $e )
{
return parent::html();
}
}
else
{
return parent::html();
}
}
/**
* Report
*
* @param string $reportContent Report content message from member
* @return \\IPS\core\Reports\Report
* @param int $reportType Report type (see constants in \IPS\core\Reports\Report
* @return \\PS\core\Reports\Report
* @throws \UnexpectedValueException If there is a permission error - you should only call this method after checking canReport
*/
public function report( $reportContent )
public function report( $reportContent, $reportType=1 )
{
$comment = \IPS\forums\Topic\Post::load( $this->pid );
return $comment->report( $reportContent );
return $comment->report( $reportContent, $reportType );
}
/**
@@ -166,6 +194,18 @@ class _CommentTopicSync extends \IPS\cms\Records\Comment
{
return array( array( static::$databasePrefix . static::$databaseColumnMap['item'] . '=?', $id ) );
}
/**
* Post count for member
*
* @param \IPS\Member $member The memner
* @return int
* @note We explicitely return 0 because any posts will be counted via the forums application inherently already
*/
public static function memberPostCount( \IPS\Member $member )
{
return 0;
}
/**
* Reaction Type
@@ -176,4 +216,15 @@ class _CommentTopicSync extends \IPS\cms\Records\Comment
{
return 'pid';
}
/**
* Reaction class
*
* @return string
*/
public static function reactionClass()
{
return 'IPS\forums\Topic\Post';
}
}