Skip to content

Commit

Permalink
dev/core#122 Add check for DELETE flag before unsetting it
Browse files Browse the repository at this point in the history
  • Loading branch information
mickadoo committed May 17, 2018
1 parent 1c02925 commit 218d9fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CRM/Core/BAO/CustomOption.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static public function getOptionListSelector(&$params) {
);

// disable deletion of option values for locked option groups
if ($isGroupLocked) {
if (($action & CRM_Core_Action::DELETE) && $isGroupLocked) {
$action -= CRM_Core_Action::DELETE;
}

Expand Down
2 changes: 1 addition & 1 deletion CRM/Core/OptionValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public static function getRows($groupParams, $links, $orderBy = 'weight', $skipE
}

// disallow deletion of option values for locked groups
if ($isGroupLocked) {
if (($action & CRM_Core_Action::DELETE) && $isGroupLocked) {
$action -= CRM_Core_Action::DELETE;
}

Expand Down

0 comments on commit 218d9fd

Please sign in to comment.