Version 4.1.19

This commit is contained in:
Neo committed 2025-12-19 05:38:56 -08:00
1 parent 28bd025b35
commit 2bd5025018
2674 files changed
+233518 -77766

No files matched your search

@@ -2,9 +2,9 @@
/**
* @brief Moderation
* @author <a href='http://www.invisionpower.com'>Invision Power Services, Inc.</a>
* @copyright (c) 2001 - SVN_YYYY Invision Power Services, Inc.
* @copyright (c) 2001 - 2016 Invision Power Services, Inc.
* @license http://www.invisionpower.com/legal/standards/
* @package IPS Social Suite
* @package IPS Community Suite
* @since 23 Jul 2013
* @version SVN_VERSION_NUMBER
*/
@@ -33,12 +33,23 @@ class _moderation extends \IPS\Dispatcher\Controller
\IPS\Session::i()->csrfCheck();
$member = \IPS\Member::load( \IPS\Request::i()->id );
$redirectTarget = ( \IPS\Request::i()->referrer ) ? \IPS\Http\Url::createFromString( urldecode( \IPS\Request::i()->referrer ), TRUE ) : $member->url();
if ( $member->member_id and $member->member_id != \IPS\Member::loggedIn()->member_id and \IPS\Member::loggedIn()->modPermission('can_flag_as_spammer') and !$member->modPermission() and !$member->isAdmin() )
{
if ( \IPS\Request::i()->s )
{
$member->flagAsSpammer();
\IPS\Session::i()->modLog( 'modlog__spammer_flagged', array( $member->name => FALSE ) );
$actions = explode( ',', \IPS\Settings::i()->spm_option );
/* Redirect to the users profile if we're deleting the content to avoid that the moderator sees a 404 error message */
if ( in_array( 'delete', $actions ) )
{
$redirectTarget = $member->url();
}
}
else
{
@@ -47,6 +58,6 @@ class _moderation extends \IPS\Dispatcher\Controller
}
}
\IPS\Output::i()->redirect( ( \IPS\Request::i()->referrer ) ? new \IPS\Http\Url( urldecode( \IPS\Request::i()->referrer ), TRUE ) : $member->url(), ( \IPS\Request::i()->s ) ? 'account_flagged' : 'account_unflagged');
\IPS\Output::i()->redirect( $redirectTarget, ( \IPS\Request::i()->s ) ? 'account_flagged' : 'account_unflagged');
}
}
}