Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -11,7 +11,7 @@
|
||||
namespace IPS\core\tasks;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -90,7 +90,7 @@ class _automaticmoderation extends \IPS\Task
|
||||
if ( $item and $item::$firstCommentRequired and $object->isFirst() )
|
||||
{
|
||||
/* Hide the item, not the object */
|
||||
$item->hide( FALSE, 'automaticmoderation_hide_reason' );
|
||||
$item->hide( FALSE, \IPS\core\Reports\Rules::getDefaultHideReason() );
|
||||
$hidden = TRUE;
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,7 @@ class _automaticmoderation extends \IPS\Task
|
||||
|
||||
if ( $hidden === FALSE )
|
||||
{
|
||||
$object->hide( FALSE, 'automaticmoderation_hide_reason' );
|
||||
$object->hide( FALSE, \IPS\core\Reports\Rules::getDefaultHideReason() );
|
||||
}
|
||||
|
||||
/* Remove from the pending queue */
|
||||
@@ -133,7 +133,7 @@ class _automaticmoderation extends \IPS\Task
|
||||
{
|
||||
$latestReport = \IPS\Db::i()->select( '*', 'core_rc_reports', array( 'rid=?', $report->id ), 'date_reported DESC' )->first();
|
||||
$notification = new \IPS\Notification( \IPS\Application::load('core'), 'automatic_moderation', $report, array( $report, $latestReport, $object ) );
|
||||
foreach ( \IPS\Db::i()->select( '*', 'core_members', ( count( $moderators['m'] ) ? \IPS\Db::i()->in( 'member_id', $moderators['m'] ) . ' OR ' : '' ) . \IPS\Db::i()->in( 'member_group_id', $moderators['g'] ) . ' OR ' . \IPS\Db::i()->findInSet( 'mgroup_others', $moderators['g'] ) ) as $member )
|
||||
foreach ( \IPS\Db::i()->select( '*', 'core_members', ( \count( $moderators['m'] ) ? \IPS\Db::i()->in( 'member_id', $moderators['m'] ) . ' OR ' : '' ) . \IPS\Db::i()->in( 'member_group_id', $moderators['g'] ) . ' OR ' . \IPS\Db::i()->findInSet( 'mgroup_others', $moderators['g'] ) ) as $member )
|
||||
{
|
||||
$notification->recipients->attach( \IPS\Member::constructFromData( $member ) );
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user