Admin: Exclude some apps from transfer list, even though they support the needed hook

This commit is contained in:
nathangray 2021-05-18 09:15:50 -06:00
parent d58b9e7e66
commit 6f160fe4b2

View File

@ -353,6 +353,7 @@ class admin_account
$sel_options = array(); $sel_options = array();
$preserve = $content; $preserve = $content;
static $blacklist_apps = ['preferences','notifications','esyncpro','api'];
// Get a count of entries owned by the user // Get a count of entries owned by the user
if(count($content['account_id']) == 1) if(count($content['account_id']) == 1)
@ -370,7 +371,7 @@ class admin_account
{ {
$entry = lang('Entries'); $entry = lang('Entries');
} }
if (Api\Hooks::exists('deleteaccount', $app)) if (Api\Hooks::exists('deleteaccount', $app) && !in_array($app, $blacklist_apps))
{ {
$content['delete_apps'][] = $app; $content['delete_apps'][] = $app;
$sel_options['delete_apps'][] = array( $sel_options['delete_apps'][] = array(