Wrong Action Links Shown for Reserved and Locked Option Groups
In #55 (closed) I hid the "delete" link for options in a locked option group. This has a bug as it will already not have the "delete" link if the option value is reserved:
if ($dao->is_reserved) {
$action = CRM_Core_Action::UPDATE;
}
So subtracting the CRM_Core_Action::DELETE
will result in a negative value for $action
and more links than expected will be shown.
This can be fixed by first checking if the CRM_Core_Action::DELETE
flag is active before unsetting it.
Link to PR: https://github.com/civicrm/civicrm-core/pull/12154/files