From 6c106d80fde919b10d3c4e2e8035f9d3a481f67e Mon Sep 17 00:00:00 2001 From: Thomas Date: Wed, 30 Mar 2022 17:25:52 +0200 Subject: [PATCH] remove admin coupling --- code/SoftDeletable.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/code/SoftDeletable.php b/code/SoftDeletable.php index 135af8f..556d303 100644 --- a/code/SoftDeletable.php +++ b/code/SoftDeletable.php @@ -7,10 +7,8 @@ use SilverStripe\Security\Member; use SilverStripe\ORM\DataExtension; use LeKoala\CmsActions\CustomAction; -use SilverStripe\Admin\CMSProfileController; use SilverStripe\Control\Controller; use SilverStripe\Forms\CheckboxField; -use SilverStripe\ORM\Filters\PartialMatchFilter; use SilverStripe\ORM\Queries\SQLSelect; /** @@ -139,7 +137,8 @@ public function updateCMSActions(FieldList $actions) // Hide on ProfileController if (Controller::has_curr()) { - if (Controller::curr() instanceof CMSProfileController) { + $className = get_class(Controller::curr()); + if (strpos($className, 'CMSProfileController') !== false) { return; } }