Civi::$statics[__CLASS__]['init'] = 1;
$options = &PEAR::getStaticProperty('DB_DataObject', 'options');
$options['database'] = $dsn;
+ $options['quote_identifiers'] = TRUE;
if (defined('CIVICRM_DAO_DEBUG')) {
self::DebugLevel(CIVICRM_DAO_DEBUG);
}
*
* @return array
*/
- public function fetchAll() {
+ public function fetchAll($k = FALSE, $v = FALSE, $method = FALSE) {
$result = [];
while ($this->fetch()) {
$result[] = $this->toArray();
* @see CRM_Utils_SQL_TempTable
*/
public static function createTempTableName($prefix = 'civicrm', $addRandomString = TRUE, $string = NULL) {
+ CRM_Core_Error::deprecatedFunctionWarning('Use CRM_Utils_SQL_TempTable interface to create temporary tables');
$tableName = $prefix . "_temp";
if ($addRandomString) {
* @param array $fields
*/
public static function appendPseudoConstantsToFields(&$fields) {
- foreach ($fields as $field) {
+ foreach ($fields as $fieldUniqueName => $field) {
if (!empty($field['pseudoconstant'])) {
$pseudoConstant = $field['pseudoconstant'];
if (!empty($pseudoConstant['optionGroupName'])) {
'title' => CRM_Core_BAO_OptionGroup::getTitleByName($pseudoConstant['optionGroupName']),
'name' => $pseudoConstant['optionGroupName'],
'data_type' => CRM_Utils_Type::T_STRING,
- 'is_pseudofield_for' => $field['name'],
+ 'is_pseudofield_for' => $fieldUniqueName,
];
}
// We restrict to id + name + FK as we are extending this a bit, but cautiously.