* Set variables up before form is built
*
*/
- public function preProcess(&$form) {}
+ public function preProcess(&$form) {
+ }
/**
* This is function is called by the form object to get the DataSource's
*/
private static function _CsvToTable(&$db,
$file,
- $headers = FALSE,
- $table = NULL,
+ $headers = FALSE,
+ $table = NULL,
$fieldSeparator = ','
) {
$result = array();
$duplicateColName = TRUE;
}
-
// need to truncate values per mysql field name length limits
// mysql allows 64, but we need to account for appending colKey
// CRM-9079
}
// CRM-4881: we need to quote column names, as they may be MySQL reserved words
- foreach ($columns as & $column) $column = "`$column`";
+ foreach ($columns as & $column) { $column = "`$column`";
+ }
}
else {
$columns = array();
- foreach ($firstrow as $i => $_) $columns[] = "col_$i";
+ foreach ($firstrow as $i => $_) { $columns[] = "col_$i";
+ }
}
// FIXME: we should regen this table's name if it exists rather than drop it
* Set variables up before form is built
*
*/
- public function preProcess(&$form) {}
+ public function preProcess(&$form) {
+ }
/**
* This is function is called by the form object to get the DataSource's
public function postProcess(&$params, &$db, &$form) {
$importJob = new CRM_Contact_Import_ImportJob(
CRM_Utils_Array::value( 'import_table_name', $params ),
- $params['sqlQuery'], true
+ $params['sqlQuery'], TRUE
);
$form->set('importTableName', $importJob->getTableName());