protected $_tagFilter = FALSE;
/**
- * <<<<<<< HEAD
- * Build groups filter
- * =======
* specify entity table for tags filter
*
*/
/**
* build groups filter
*
- * >>>>>>> 098a61330d0fe12153370741ec98cb1172ece849
+ * @var bool
*/
protected $_groupFilter = FALSE;
protected $_selectAliases = array();
protected $_rollup = NULL;
+ /**
+ * @var array
+ */
+ protected $_aliases = array();
+
+ /**
+ * @var string
+ */
+ protected $_where;
+
+ /**
+ * @var string
+ */
+ protected $_from;
+
/**
* SQL Limit clause
* @var string
}
/**
- * @param $field
- * @param $op
- * @param $value
- * @param $min
- * @param $max
+ * Generate where clause.
+ * This is over-ridable in reports for special treatment of a field
+ *
+ * @param string $field
+ * @param string $op
+ * @param mixed $value
+ * @param float $min
+ * @param float $max
*
* @return null|string
*/
if (CRM_Utils_Array::value('type', $field) ==
CRM_Utils_Type::T_STRING
) {
- //cycle through selections and esacape values
+ //cycle through selections and escape values
foreach ($value as $key => $selection) {
$value[$key] = CRM_Utils_Type::escape($selection, $type);
}
$clause = $this->whereTagClause($field, $value, $op);
}
elseif (!empty($field['membership_org']) && $clause) {
- $clause = $this->whereMembershipOrgClause($field, $value, $op);
+ $clause = $this->whereMembershipOrgClause($value, $op);
}
elseif (!empty($field['membership_type']) && $clause) {
- $clause = $this->whereMembershipTypeClause($field, $value, $op);
+ $clause = $this->whereMembershipTypeClause($value, $op);
}
return $clause;
}
/**
* @param string $fieldName
* @param $relative
- * @param $from
- * @param $to
+ * @param string $from
+ * @param string $to
* @param null $type
* @param null $fromTime
* @param null $toTime
}
/**
- * @param $relative
- * @param $from
- * @param $to
- * @param null $fromtime
- * @param null $totime
+ * @param bool $relative
+ * @param string $from
+ * @param string $to
+ * @param string $fromtime
+ * @param string $totime
*
* @return array
*/
public function fixSubTotalDisplay(&$row, $fields, $subtotal = TRUE) {
foreach ($row as $colName => $colVal) {
if (in_array($colName, $fields)) {
- $row[$colName] = $row[$colName];
}
elseif (isset($this->_columnHeaders[$colName])) {
if ($subtotal) {
WHERE entity_table = '$entity_table' AND {$clause} ) ";
}
- public function whereMembershipOrgClause($field, $value, $op) {
+ /**
+ * Generate membership organization clause.
+ *
+ * @param mixed $value
+ * @param string $op SQL Operator
+ *
+ * @return string
+ */
+ public function whereMembershipOrgClause($value, $op) {
$sqlOp = $this->getSQLOperator($op);
if (!is_array($value)) {
$value = array($value);
AND mem_status.is_active = '1' ) ";
}
- public function whereMembershipTypeClause($field, $value, $op) {
+ /**
+ * Generate Membership Type SQL Clause
+ * @param mixed $value
+ * @param string $op
+ *
+ * @return string
+ * SQL query string
+ */
+ public function whereMembershipTypeClause($value, $op) {
$sqlOp = $this->getSQLOperator($op);
if (!is_array($value)) {
$value = array($value);