Version 4.6.0
This commit is contained in:
1 parent
f79dcf067a
commit
517a5e1f70
2036 files changed
+110041
-26162
No files matched your search
@@ -61,4 +61,30 @@ class _Gallery
|
||||
$album->save();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Member is flagged as spammer
|
||||
*
|
||||
* @param $member \IPS\Member The member
|
||||
* @return void
|
||||
*/
|
||||
public function onSetAsSpammer( $member )
|
||||
{
|
||||
$actions = explode( ',', \IPS\Settings::i()->spm_option );
|
||||
|
||||
/* Hide or delete */
|
||||
if ( \in_array( 'unapprove', $actions ) or \in_array( 'delete', $actions ) )
|
||||
{
|
||||
foreach( \IPS\gallery\Album::loadByOwner( $member ) as $album )
|
||||
{
|
||||
$album->hidden = -1;
|
||||
$album->save();
|
||||
|
||||
if( \in_array( 'delete', $actions ) )
|
||||
{
|
||||
\IPS\Task::queue( 'core', 'DeleteOrMoveContent', array( 'class' => 'IPS\gallery\Album', 'id' => $album->id, 'deleteWhenDone' => TRUE ), 3 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user