Skip to content

Commit

Permalink
remove admin coupling
Browse files Browse the repository at this point in the history
  • Loading branch information
lekoala committed Mar 30, 2022
1 parent 6ecba31 commit 6c106d8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions code/SoftDeletable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 6c106d8

Please sign in to comment.