Version 4.7.13

This commit is contained in:
Neo committed 2025-12-19 16:14:56 -08:00
1 parent fd22d99e69
commit 7124a02564
954 files changed
+29277 -59308

No files matched your search

+22 -7
View File
@@ -87,7 +87,7 @@ class _members extends \IPS\Api\Controller
}
elseif( \IPS\Request::i()->group )
{
$where[] = array( "(member_group_id=" . \intval( \IPS\Request::i()->group ) . ") OR (" . \IPS\Db::i()->findInSet( 'mgroup_others', array( \intval( \IPS\Request::i()->group ) ) ) . ")" );
$where[] = array( "(member_group_id=" . \intval( \IPS\Request::i()->group ) . " OR " . \IPS\Db::i()->findInSet( 'mgroup_others', array( \intval( \IPS\Request::i()->group ) ) ) . ")" );
}
}
@@ -897,6 +897,7 @@ class _members extends \IPS\Api\Controller
* @reqapiparam int|null moderator Member ID of the moderator to issue the warning from
* @apiparam int|null reason Warn reason to use for this warning
* @apiparam int|null points Points to issue for the warning. Will use the points from the reason if not specified and a reason is, or if the reason does not allow points to be overridden.
* @apiparam int|null deductPoints Achievement points to deduct. Will use the points deduction from the reason if not specified and a reason is, or if the reason does not allow deductions to be overriden.
* @apiparam string|null memberNote Note to display to the member as HTML (e.g. "<p>This is a comment.</p>"). Will be sanatized for requests using an OAuth Access Token for a particular member; will be saved unaltered for requests made using an API Key or the Client Credentials Grant Type.
* @apiparam string|null moderatorNote Note to display to moderators as HTML (e.g. "<p>This is a comment.</p>"). Will be sanatized for requests using an OAuth Access Token for a particular member; will be saved unaltered for requests made using an API Key or the Client Credentials Grant Type.
* @apiparam bool acknowledged Whether the warning should be considered acknowledged by the member or not
@@ -944,12 +945,13 @@ class _members extends \IPS\Api\Controller
$warning->moderator = $this->member ? $this->member->member_id : \IPS\Member::load( \IPS\Request::i()->moderator )->member_id;
$options = array(
'warn_points' => (int) \IPS\Request::i()->points,
'warn_reason' => \IPS\Request::i()->reason,
'warn_member_note' => \IPS\Request::i()->memberNote,
'warn_mod_note' => \IPS\Request::i()->modertorNote,
'warn_punishment' => array(),
'warn_remove' => NULL,
'warn_points' => (int) \IPS\Request::i()->points,
'warn_reason' => \IPS\Request::i()->reason,
'warn_cheeve_point_reduction' => (int) \IPS\Request::i()->deductPoints,
'warn_member_note' => \IPS\Request::i()->memberNote,
'warn_mod_note' => \IPS\Request::i()->moderatorNote,
'warn_punishment' => array(),
'warn_remove' => NULL,
);
if ( $this->member )
@@ -958,6 +960,19 @@ class _members extends \IPS\Api\Controller
$options['warn_mod_note'] = \IPS\Text\Parser::parseStatic( $options['warn_mod_note'], TRUE, NULL, $this->member, 'core_Modcp' );
}
if( isset( \IPS\Request::i()->reason ) )
{
try
{
$reason = \IPS\core\Warnings\Reason::load( \IPS\Request::i()->reason );
if( $reason->cheev_point_reduction AND ( !$options['warn_cheeve_point_reduction'] OR !$reason->cheev_override ) )
{
$options['warn_cheeve_point_reduction'] = $reason->cheev_point_reduction;
}
}
catch( \OutOfRangeException $e ){}
}
if( isset( \IPS\Request::i()->expire ) )
{
if( \IPS\Request::i()->expire == -1 )