Browse Source

Added Function to Shadow Delete - You can set a mod level for automatically permanently delete posts that mod deletes

main
PupperWoff 7 years ago
committed by discomrade
parent
commit
73a0547fe6
  1. 2
      inc/config.php
  2. 2
      inc/functions.php

2
inc/config.php

@ -1766,6 +1766,8 @@
$config['mod']['feature_archived_threads'] = JANITOR;
// Delete featured archived threads
$config['mod']['delete_featured_archived_threads'] = MOD;
// Automatically permanently delete posts and threads (set to false if you want to keep for all)
$config['mod']['auto_delete_shadow_post'] = MOD;
// View shadow deleted posts and threads
$config['mod']['view_shadow_posts'] = MOD;
// Restore shadow deleted posts and threads

2
inc/functions.php

@ -1439,7 +1439,7 @@ function deletePostShadow($id, $error_if_doesnt_exist=true, $rebuild_after=true)
global $board, $config;
// If we are using non permanent delete run that function
if($config['shadow_del']['use'])
if($config['shadow_del']['use'] && ($config['mod']['auto_delete_shadow_post'] === false || !hasPermission($config['mod']['auto_delete_shadow_post'])))
return ShadowDelete::deletePost($id, $error_if_doesnt_exist, $rebuild_after);
else
return deletePostPermanent($id, $error_if_doesnt_exist, $rebuild_after);

Loading…
Cancel
Save