Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Adriano Faria Posted March 26, 2020 Posted March 26, 2020 I have 2 content item types in my app and one of them I don't need to send it to ModCP -> Deleted Content when a moderator deletes it; I want to delete it right away. Tried to return FALSE in logDelete() in this content item or even don't have a logDelete() method but both doesn't work. How can I do that? Thank you.
Solution Ryan Ashbrook Posted March 26, 2020 Solution Posted March 26, 2020 In your Content model, do something like this: /** * Do Moderator Action * * @param string $action The action * @param \IPS\Member|NULL $member The member doing the action (NULL for currently logged in member) * @param string|NULL $reason Reason (for hides) * @param bool $immediately Delete Immediately * @return void * @throws \OutOfRangeException|\InvalidArgumentException|\RuntimeException */ public function modAction( $action, \IPS\Member $member = NULL, $reason = NULL, $immediately = FALSE ) { if ( $action === 'delete' ) { $immediately = TRUE; } return parent::modAction( $action, $member, $reason, $immediately ); } Adriano Faria 1
Recommended Posts