$this->_chartButtonName = $this->getButtonName('submit', 'chart');
}
- static function addBreadCrumb() {
+ function addBreadCrumb() {
$breadCrumbs =
array(
array(
$this->preProcessCommon();
if (!$this->_id) {
- self::addBreadCrumb();
+ $this->addBreadCrumb();
}
foreach ($this->_columns as $tableName => $table) {
}
}
- static function getSQLOperator($operator = "like") {
+ function getSQLOperator($operator = "like") {
switch ($operator) {
case 'eq':
return '=';
else {
$value = "'{$value}'";
}
- $sqlOP = self::getSQLOperator($op);
+ $sqlOP = $this->getSQLOperator($op);
$clause = "( {$field['dbAlias']} $sqlOP $value )";
}
break;
case 'in':
case 'notin':
if ($value !== NULL && is_array($value) && count($value) > 0) {
- $sqlOP = self::getSQLOperator($op);
+ $sqlOP = $this->getSQLOperator($op);
if (CRM_Utils_Array::value('type', $field) == CRM_Utils_Type::T_STRING) {
//cycle through selections and esacape values
foreach ($value as $key => $selection) {
case 'mhas':
// mhas == multiple has
if ($value !== NULL && count($value) > 0) {
- $sqlOP = self::getSQLOperator($op);
+ $sqlOP = $this->getSQLOperator($op);
$clause = "{$field['dbAlias']} REGEXP '[[:<:]]" . implode('|', $value) . "[[:>:]]'";
}
break;
else {
$value = "'{$value}'";
}
- $sqlOP = self::getSQLOperator($op);
+ $sqlOP = $this->getSQLOperator($op);
$clause = "( {$field['dbAlias']} $sqlOP $value )";
}
break;
case 'nll':
case 'nnll':
- $sqlOP = self::getSQLOperator($op);
+ $sqlOP = $this->getSQLOperator($op);
$clause = "( {$field['dbAlias']} $sqlOP )";
break;
}
else {
$value = CRM_Utils_Type::escape($value, $type);
- $sqlOP = self::getSQLOperator($op);
+ $sqlOP = $this->getSQLOperator($op);
if ($field['type'] == CRM_Utils_Type::T_STRING) {
$value = "'{$value}'";
}
) {
$clauses = array();
if (in_array($relative, array_keys($this->getOperationPair(CRM_Report_FORM::OP_DATE)))) {
- $sqlOP = self::getSQLOperator($relative);
+ $sqlOP = $this->getSQLOperator($relative);
return "( {$fieldName} {$sqlOP} )";
}
- list($from, $to) = self::getFromTo($relative, $from, $to, $fromTime, $toTime);
+ list($from, $to) = $this->getFromTo($relative, $from, $to, $fromTime, $toTime);
if ($from) {
$from = ($type == CRM_Utils_Type::T_DATE) ? substr($from, 0, 8) : $from;
return NULL;
}
-
- static function dateDisplay($relative, $from, $to) {
- list($from, $to) = self::getFromTo($relative, $from, $to);
+ /**
+ * @todo - could not find any instances where this is called
+ * @param unknown_type $relative
+ * @param String $from
+ * @param String_type $to
+ * @return string|NULL
+ */
+ function dateDisplay($relative, $from, $to) {
+ list($from, $to) = $this->getFromTo($relative, $from, $to);
if ($from) {
$clauses[] = CRM_Utils_Date::customFormat($from, NULL, array('m', 'M'));
return NULL;
}
- static function getFromTo($relative, $from, $to, $fromtime = NULL, $totime = NULL) {
+ function getFromTo($relative, $from, $to, $fromtime = NULL, $totime = NULL) {
if (empty($totime)) {
$totime = '235959';
}
WHERE smartgroup_contact.group_id IN ({$smartGroups}) ";
}
- $sqlOp = self::getSQLOperator($op);
+ $sqlOp = $this->getSQLOperator($op);
if (!is_array($value)) {
$value = array($value);
}
// not using left join in query because if any contact
// belongs to more than one tag, results duplicate
// entries.
- $sqlOp = self::getSQLOperator($op);
+ $sqlOp = $this->getSQLOperator($op);
if (!is_array($value)) {
$value = array($value);
}