Commit 8b15ba68 authored by dubwise's avatar dubwise
Browse files

First Release

parent 9b95c52a
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -284,8 +284,11 @@ class Vtiger_Record_Model extends Vtiger_Base_Model {
	public static function getSearchResult($searchKey, $module=false) {
		$db = PearDatabase::getInstance();

		$query = 'SELECT label, crmid, setype, createdtime FROM vtiger_crmentity WHERE label LIKE ? AND vtiger_crmentity.deleted = 0';
		$params = array("%$searchKey%");
// Search Mod
//		$query = 'SELECT label, crmid, setype, createdtime FROM vtiger_crmentity WHERE label LIKE ? AND vtiger_crmentity.deleted = 0';
//		$params = array("%$searchKey%");
		$query = 'SELECT label, searchlabel, crmid, setype, createdtime, smownerid FROM vtiger_crmentity crm INNER JOIN vtiger_entityname e ON crm.setype = e.modulename LEFT JOIN globalsearch_data ON crm.crmid = globalsearch_data.gscrmid WHERE searchlabel LIKE ? AND crm.deleted = 0';
		$params = array("%$searchKey%", 1);

		if($module !== false) {
			$query .= ' AND setype = ?';