Merge branch 'master' into 5.15
authorEileen McNaughton <emcnaughton@wikimedia.org>
Wed, 3 Jul 2019 01:22:37 +0000 (13:22 +1200)
committerGitHub <noreply@github.com>
Wed, 3 Jul 2019 01:22:37 +0000 (13:22 +1200)
1  2 
CRM/Core/DAO.php

index e2adbc6f7e97f3477452e90e244ca2d676968acc,82c4ebc9f264d217d02b4c10b4876a917611ec0a..5eb4713b8fe6cb21cf520acaa6b636478e1ec983
@@@ -1671,8 -1674,10 +1674,10 @@@ FROM   civicrm_domai
          }
        }
        $newObject->save();
-       $newObject->copyCustomFields($object->id, $newObject->id);
+       if (!$blockCopyofCustomValues) {
+         $newObject->copyCustomFields($object->id, $newObject->id);
+       }
 -      CRM_Utils_Hook::post('create', CRM_Core_DAO_AllCoreTables::getBriefName($daoName), $newObject->id, $newObject);
 +      CRM_Utils_Hook::post('create', CRM_Core_DAO_AllCoreTables::getBriefName(str_replace('_BAO_', '_DAO_', $daoName)), $newObject->id, $newObject);
      }
  
      return $newObject;