X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FDAO.php;h=b947740e0e595b59c44c180a7e94d3b4a33390e3;hb=9473891b55f6d10169c290425611ecff49159bf7;hp=bc6afb6ff7309578b7b4743887764e8388f50b6c;hpb=21586d70eafe1ea23f5495d01a2ac34ac18f72cc;p=civicrm-core.git diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index bc6afb6ff7..b947740e0e 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -1736,7 +1736,7 @@ FROM civicrm_domain if (!$blockCopyofCustomValues) { $newObject->copyCustomFields($object->id, $newObject->id); } - CRM_Utils_Hook::post('create', CRM_Core_DAO_AllCoreTables::getBriefName(str_replace('_BAO_', '_DAO_', $daoName)), $newObject->id, $newObject); + CRM_Utils_Hook::post('create', CRM_Core_DAO_AllCoreTables::getBriefName($daoName), $newObject->id, $newObject); } return $newObject; @@ -2589,14 +2589,16 @@ SELECT contact_id * @param string $context * @see CRM_Core_DAO::buildOptionsContext * @param array $props - * whatever is known about this bao object. + * Raw field values; whatever is known about this bao object. + * + * Note: $props can contain unsanitized input and should not be passed directly to CRM_Core_PseudoConstant::get * * @return array|bool */ public static function buildOptions($fieldName, $context = NULL, $props = []) { // If a given bao does not override this function $baoName = get_called_class(); - return CRM_Core_PseudoConstant::get($baoName, $fieldName, $props, $context); + return CRM_Core_PseudoConstant::get($baoName, $fieldName, [], $context); } /**