From 73a0547fe63ae01a4fb7bc30f693621d16cb6fd7 Mon Sep 17 00:00:00 2001 From: PupperWoff Date: Sun, 11 Jun 2017 01:48:53 +0200 Subject: [PATCH] Added Function to Shadow Delete - You can set a mod level for automatically permanently delete posts that mod deletes --- inc/config.php | 2 ++ inc/functions.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/inc/config.php b/inc/config.php index a59aa628..2177e507 100644 --- a/inc/config.php +++ b/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 diff --git a/inc/functions.php b/inc/functions.php index 63b33869..c961f1b2 100755 --- a/inc/functions.php +++ b/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);