X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FBAO%2FCustomValueTable.php;h=2cb38118fdb0efc4b423d88af632a6a70b562586;hb=b48a37b4f830f20c3d0fd28ada9a9e2a30356f47;hp=cd52496a9365261ac9416589d177ff22ff9c736e;hpb=e33df30ac5111d147f811b4c1d4330457048159b;p=civicrm-core.git diff --git a/CRM/Core/BAO/CustomValueTable.php b/CRM/Core/BAO/CustomValueTable.php index cd52496a93..2cb38118fd 100644 --- a/CRM/Core/BAO/CustomValueTable.php +++ b/CRM/Core/BAO/CustomValueTable.php @@ -34,6 +34,11 @@ */ class CRM_Core_BAO_CustomValueTable { + /** + * @param $customParams + * + * @throws Exception + */ static function create(&$customParams) { if (empty($customParams) || !is_array($customParams) @@ -250,6 +255,8 @@ class CRM_Core_BAO_CustomValueTable { * * @param string $type the civicrm type string * + * @param int $maxLength + * * @return the mysql data store placeholder * @access public * @static @@ -298,6 +305,11 @@ class CRM_Core_BAO_CustomValueTable { } } + /** + * @param $params + * @param $entityTable + * @param $entityID + */ static function store(&$params, $entityTable, $entityID) { $cvParams = array(); foreach ($params as $fieldID => $param) { @@ -339,6 +351,13 @@ class CRM_Core_BAO_CustomValueTable { } } + /** + * @param $params + * @param $customFields + * @param $entityTable + * @param $entityID + * @param $customFieldExtends + */ static function postProcess(&$params, &$customFields, $entityTable, $entityID, $customFieldExtends) { $customData = CRM_Core_BAO_CustomField::postProcess($params, $customFields, @@ -471,6 +490,9 @@ AND $cond * * @array $params * + * @param $params + * + * @throws Exception * @return array * @static */ @@ -573,6 +595,10 @@ AND cf.id IN ( $fieldIDList ) 'is_multiple' => $dao->is_multiple, ); + if ($cvParam['type'] == 'File') { + $cvParam['file_id'] = $fieldValue['value']; + } + if (!array_key_exists($dao->table_name, $cvParams)) { $cvParams[$dao->table_name] = array(); } @@ -609,6 +635,9 @@ AND cf.id IN ( $fieldIDList ) * * @array $params * + * @param $params + * + * @throws Exception * @return array * @static */