X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FProfile%2FForm.php;h=59a7096096c761c31309f07c7bd9e47c96018f30;hb=f38178e6aa43297ef8b9e08ca1bcb6bd49c81473;hp=31e24a1691cd4983243110916276225d10eab524;hpb=5d867d83ac582e4c45417c82610d569100d6da43;p=civicrm-core.git diff --git a/CRM/Profile/Form.php b/CRM/Profile/Form.php index 31e24a1691..59a7096096 100644 --- a/CRM/Profile/Form.php +++ b/CRM/Profile/Form.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 4.6 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2014 | + | Copyright CiviCRM LLC (c) 2004-2015 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -28,7 +28,7 @@ /** * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2014 + * @copyright CiviCRM LLC (c) 2004-2015 * $Id$ * */ @@ -111,6 +111,12 @@ class CRM_Profile_Form extends CRM_Core_Form { */ public $_isUpdateDupe = 0; + /** + * Dedupe using a specific rule (CRM-6131). + * Not currently exposed in profile settings, but can be set in a buildForm hook. + */ + public $_ruleGroupID = NULL; + public $_isAddCaptcha = FALSE; protected $_isPermissionedChecksum = FALSE; @@ -129,8 +135,6 @@ class CRM_Profile_Form extends CRM_Core_Form { */ protected $_ctype = NULL; - protected $_defaults = NULL; - /** * Store profile ids if multiple profile ids are passed using comma separated. * Currently lets implement this functionality only for dialog mode @@ -176,6 +180,13 @@ class CRM_Profile_Form extends CRM_Core_Form { protected $_currentUserID = NULL; protected $_session = NULL; + /** + * Explicitly declare the entity api name. + */ + public function getDefaultEntity() { + return 'Profile'; + } + /** * Pre processing work done here. * @@ -314,7 +325,7 @@ class CRM_Profile_Form extends CRM_Core_Form { $this->_recordId = NULL; $this->set('recordId', NULL); } - //record id is neccessary for _multiRecord view and update/edit action + //record id is necessary for _multiRecord view and update/edit action if (!$this->_recordId && ($this->_multiRecord == CRM_Core_Action::UPDATE || $this->_multiRecord == CRM_Core_Action::DELETE) ) { @@ -946,7 +957,8 @@ class CRM_Profile_Form extends CRM_Core_Form { $ids = CRM_Dedupe_Finder::dupesByParams($dedupeParams, $ctype, $ruleType, - $exceptions + $exceptions, + $form->_ruleGroupID ); if ($ids) { if ($form->_isUpdateDupe == 2) {