Skip to content

Commit

Permalink
Merge pull request #12154 from compucorp/122-fix-bug-with-action-links
Browse files Browse the repository at this point in the history
dev/core#122 Wrong Action Links Shown for Reserved and Locked Option Groups
  • Loading branch information
colemanw authored May 17, 2018
2 parents 1c02925 + 218d9fd commit 6ea9063
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 6ea9063

Please sign in to comment.