<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.5 |
+ | CiviCRM version 4.6 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* $Id$
*
*/
-class CRM_Contact_Form_Search_Custom_FullText implements CRM_Contact_Form_Search_Interface {
+class CRM_Contact_Form_Search_Custom_FullText extends CRM_Contact_Form_Search_Custom_Base implements CRM_Contact_Form_Search_Interface {
const LIMIT = 10;
/**
* @param $formValues
*/
- function __construct(&$formValues) {
+ public function __construct(&$formValues) {
$this->_partialQueries = array(
new CRM_Contact_Form_Search_Custom_FullText_Contact(),
new CRM_Contact_Form_Search_Custom_FullText_Activity(),
return $value;
}
- function __destruct() {
+ public function __destruct() {
}
- function initialize() {
+ public function initialize() {
static $initialized = FALSE;
if (!$initialized) {
}
}
- function buildTempTable() {
+ public function buildTempTable() {
$randomNum = md5(uniqid());
$this->_tableName = "civicrm_temp_custom_details_{$randomNum}";
'membership_end_date' => 'datetime',
'membership_source' => 'varchar(255)',
'membership_status' => 'varchar(255)',
-
// We may have multiple files to list on one record.
// The temporary-table approach can't store full details for all of them
'file_ids' => 'varchar(255)', // comma-separate id listing
CRM_Core_DAO::executeQuery($sql);
}
- function fillTable() {
+ public function fillTable() {
foreach ($this->_partialQueries as $partialQuery) {
/** @var $partialQuery CRM_Contact_Form_Search_Custom_FullText_AbstractPartialQuery */
if (!$this->_table || $this->_table == $partialQuery->getName()) {
$this->filterACLContacts();
}
- function filterACLContacts() {
+ public function filterACLContacts() {
if (CRM_Core_Permission::check('view all contacts')) {
CRM_Core_DAO::executeQuery("DELETE FROM {$this->_tableName} WHERE contact_id IN (SELECT id FROM civicrm_contact WHERE is_deleted = 1)");
return;
/**
* @param CRM_Core_Form $form
*/
- function buildForm(&$form) {
+ public function buildForm(&$form) {
$config = CRM_Core_Config::singleton();
$form->applyFilter('__ALL__', 'trim');
}
}
- $form->add('select', 'table', ts('Tables'), $tables );
+ $form->add('select', 'table', ts('Tables'), $tables);
$form->assign('csID', $form->get('csid'));
/**
* @return array
*/
- function &columns() {
+ public function &columns() {
$this->_columns = array(
- ts('Contact Id') => 'contact_id',
+ ts('Contact ID') => 'contact_id',
ts('Name') => 'sort_name',
);
/**
* @return array
*/
- function summary() {
+ public function summary() {
$this->initialize();
$summary = array();
/**
* @return null|string
*/
- function count() {
+ public function count() {
$this->initialize();
if ($this->_table) {
*
* @return null|string
*/
- function contactIDs($offset = 0, $rowcount = 0, $sort = NULL, $returnSQL = FALSE) {
+ public function contactIDs($offset = 0, $rowcount = 0, $sort = NULL, $returnSQL = FALSE) {
$this->initialize();
if ($returnSQL) {
*
* @return string
*/
- function all($offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE) {
+ public function all($offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE) {
$this->initialize();
if ($justIDs) {
/**
* @return null
*/
- function from() {
+ public function from() {
return NULL;
}
*
* @return null
*/
- function where($includeContactIDs = FALSE) {
+ public function where($includeContactIDs = FALSE) {
return NULL;
}
/**
* @return string
*/
- function templateFile() {
+ public function templateFile() {
return 'CRM/Contact/Form/Search/Custom/FullText.tpl';
}
/**
* @return array
*/
- function setDefaultValues() {
+ public function setDefaultValues() {
return array();
}
/**
* @param $row
*/
- function alterRow(&$row) {
+ public function alterRow(&$row) {
}
/**
* @param $title
*/
- function setTitle($title) {
+ public function setTitle($title) {
if ($title) {
CRM_Utils_System::setTitle($title);
}
/**
* @param int|array $limit
- * @return string SQL
+ * @return string
+ * SQL
* @see CRM_Contact_Form_Search_Custom_FullText_AbstractPartialQuery::toLimit
*/
public function toLimit($limit) {
}
return $result;
}
+
}