Skip to content
Snippets Groups Projects

Fixes #1546 CRMEntity buildSearchQueryForFieldTypes() api cleanup

Merged Uma requested to merge uma.s/vtigercrm:cleanup_buildSearchQueryForFieldTypes into 7.4.0
+ 10
2
Compare changes
  • Side-by-side
  • Inline
+ 10
2
@@ -2653,12 +2653,20 @@ class CRMEntity {
}
}
$query = "select crmid as id ";
$entityfields = getEntityField($module);
$querycolumnnames = implode(',', $lookupcolumns);
$entitycolumnnames = $entityfields['fieldname'];
$query = "select crmid as id, $querycolumnnames, $entitycolumnnames as name ";
$log->fatal('$entitycolumnnames');
$log->fatal($entitycolumnnames);
if(!empty($querycolumnnames)){
$query .= ", $querycolumnnames";
}
if(!empty($entitycolumnnames)){
$query .= ", $entitycolumnnames as name ";
}
$query .= " FROM $this->table_name ";
$query .=" INNER JOIN vtiger_crmentity ON $this->table_name.$this->table_index = vtiger_crmentity.crmid AND deleted = 0 ";
$query .= " INNER JOIN vtiger_crmentity ON $this->table_name.$this->table_index = vtiger_crmentity.crmid AND deleted = 0 ";
//remove the base table
$LookupTable = array_unique($lookuptables);
Loading