+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
const PREFIX = 'custom_value_';
/**
- * The set of custom field ids
+ * The set of custom field ids.
*
* @var array
*/
protected $_ids;
/**
- * The select clause
+ * The select clause.
*
* @var array
*/
public $_select;
/**
- * The name of the elements that are in the select clause
+ * The name of the elements that are in the select clause.
* used to extract the values
*
* @var array
public $_element;
/**
- * The tables involved in the query
+ * The tables involved in the query.
*
* @var array
*/
public $_whereTables;
/**
- * The where clause
+ * The where clause.
*
* @var array
*/
public $_where;
/**
- * The english language version of the query
+ * The english language version of the query.
*
* @var array
*/
public $_qill;
/**
- * The cache to translate the option values into labels
+ * The cache to translate the option values into labels.
*
* @var array
*/
public $_options;
/**
- * The custom fields information
+ * The custom fields information.
*
* @var array
*/
protected $_locationSpecificCustomFields;
/**
- * This stores custom data group types and tables that it extends
+ * This stores custom data group types and tables that it extends.
*
* @var array
*/
);
/**
- * Class constructor
+ * Class constructor.
*
* Takes in a set of custom field ids andsets up the data structures to
* generate a query
}
/**
- * Generate the select clause and the associated tables
+ * Generate the select clause and the associated tables.
* for the from clause
*
* @return void
}
/**
- * Generate the where clause and also the english language
+ * Generate the where clause and also the english language.
* equivalent
*
* @return void
$toValue = CRM_Utils_Array::value('to', $value);
if (!$fromValue && !$toValue) {
- if (!CRM_Utils_Date::processDate($value) && $op != 'IS NULL' && $op != 'IS NOT NULL') {
+ if (!CRM_Utils_Date::processDate($value) && !in_array($op, array('IS NULL', 'IS NOT NULL', 'IS EMPTY', 'IS NOT EMPTY'))) {
continue;
}
}
/**
- * Function that does the actual query generation
+ * Function that does the actual query generation.
* basically ties all the above functions together
*
* @return array
$this->_qill[$grouping][] = $label . ' - ' . implode(' ' . ts('and') . ' ', $qill);
}
}
+
}