From bbce9d40c0d522a690cdfce7ca0a67b9d73afe3f Mon Sep 17 00:00:00 2001 From: "Donald A. Lobo" Date: Tue, 12 Nov 2013 06:56:13 -0800 Subject: [PATCH] CRM-13745 - fix mysql exception ---------------------------------------- * CRM-13745: CRM_Contact_Form_Search_Custom_FullText: broken links from search results http://issues.civicrm.org/jira/browse/CRM-13745 --- CRM/Contact/Form/Search/Custom/FullText.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Form/Search/Custom/FullText.php b/CRM/Contact/Form/Search/Custom/FullText.php index ac66a14646..0af9a03ae8 100644 --- a/CRM/Contact/Form/Search/Custom/FullText.php +++ b/CRM/Contact/Form/Search/Custom/FullText.php @@ -838,10 +838,16 @@ WHERE (c.sort_name LIKE {$this->_text} OR c.display_name LIKE {$this->_text } } - function contactIDs($offset = 0, $rowcount = 0, $sort = NULL) { + function contactIDs($offset = 0, $rowcount = 0, $sort = NULL, $returnSQL = FALSE) { $this->initialize(); - return CRM_Core_DAO::singleValueQuery("SELECT contact_id FROM {$this->_tableName}"); + $sql = "SELECT contact_id FROM {$this->_tableName}"; + if ($returnSQL) { + return $sql; + } + else { + return CRM_Core_DAO::singleValueQuery($sql); + } } function all($offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE) { -- 2.25.1