From a7fe0b5d91b895a701ebc0c99835bd78a270ec80 Mon Sep 17 00:00:00 2001 From: yashodha Date: Mon, 21 Sep 2015 17:08:19 +0530 Subject: [PATCH] CRM-17237: more fixes ---------------------------------------- * CRM-17237: Add Dedupe Rule allows user to save invalid (empty) RESERVED rule https://issues.civicrm.org/jira/browse/CRM-17237 --- CRM/Contact/Form/DedupeRules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Form/DedupeRules.php b/CRM/Contact/Form/DedupeRules.php index d438080d35..9550dfc696 100644 --- a/CRM/Contact/Form/DedupeRules.php +++ b/CRM/Contact/Form/DedupeRules.php @@ -155,7 +155,7 @@ class CRM_Contact_Form_DedupeRules extends CRM_Admin_Form { $errors = array(); $fieldSelected = FALSE; for ($count = 0; $count < self::RULES_COUNT; $count++) { - if (!empty($fields["where_$count"])) { + if (!empty($fields["where_$count"]) || ($self->_defaults['is_reserved'] && !empty($self->_defaults["where_$count"]))) { $fieldSelected = TRUE; break; } @@ -228,7 +228,7 @@ UPDATE civicrm_dedupe_rule_group } // lets skip updating of fields for reserved dedupe group - if ($rgDao->is_reserved) { + if ($this->_defaults['is_reserved']) { CRM_Core_Session::setStatus(ts("The rule '%1' has been saved.", array(1 => $rgDao->title)), ts('Saved'), 'success'); return; } -- 2.25.1