X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FDAO.php;h=cab84ffeb0ee3720ee91810ef5ed0ca91b2bc8f2;hb=3d04355de56e2293afda299bc4e00d5816010082;hp=5ab5d76d529e954950e7807b378dbe0884ee123b;hpb=06d75166b712a59296fb5fdd382d56043422a48a;p=civicrm-core.git diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index 5ab5d76d52..cab84ffeb0 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -1,9 +1,9 @@ warning(ts('use copyParams to serialize arrays (' . __CLASS__ . '.' . $name . ')'), ['civi.tag' => 'deprecated']); + } $this->$dbName = $pValue; $allNull = FALSE; } @@ -1659,10 +1662,10 @@ FROM civicrm_domain * * @param $componentIDs * @param string $tableName - * + * @param string $idField * @return array */ - public static function &getContactIDsFromComponent(&$componentIDs, $tableName) { + public static function getContactIDsFromComponent($componentIDs, $tableName, $idField = 'id') { $contactIDs = array(); if (empty($componentIDs)) { @@ -1673,7 +1676,7 @@ FROM civicrm_domain $query = " SELECT contact_id FROM $tableName - WHERE id IN ( $IDs ) + WHERE $idField IN ( $IDs ) "; $dao = CRM_Core_DAO::executeQuery($query);