Commit 35a79260 authored by alexpott's avatar alexpott

Issue #2003522 by jeroen12345, trevjs, nathangervais: Rename Views method...

Issue #2003522 by jeroen12345, trevjs, nathangervais: Rename Views method op_simple() to opSimple().
parent c5d336e3
......@@ -178,7 +178,7 @@ protected function opBetween($field) {
$this->query->add_where_expression($this->options['group'], "$field $operator $a AND $b");
}
function op_simple($field) {
protected function opSimple($field) {
$value = intval(strtotime($this->value['value'], 0));
if (!empty($this->value['type']) && $this->value['type'] == 'offset') {
$value = '***CURRENT_TIME***' . sprintf('%+d', $value); // keep sign
......
......@@ -39,7 +39,7 @@ protected function opBetween($field) {
}
}
function op_simple($field) {
protected function opSimple($field) {
$placeholder = $this->placeholder();
$this->query->addHavingExpression($this->options['group'], "$field $this->operator $placeholder", array($placeholder => $this->value['value']));
}
......
......@@ -109,14 +109,14 @@ function operators() {
'title' => t('Is one of'),
'short' => t('in'),
'short_single' => t('='),
'method' => 'op_simple',
'method' => 'opSimple',
'values' => 1,
),
'not in' => array(
'title' => t('Is not one of'),
'short' => t('not in'),
'short_single' => t('<>'),
'method' => 'op_simple',
'method' => 'opSimple',
'values' => 1,
),
);
......@@ -376,7 +376,7 @@ public function query() {
}
}
function op_simple() {
protected function opSimple() {
if (empty($this->value)) {
return;
}
......
......@@ -39,37 +39,37 @@ function operators() {
$operators = array(
'<' => array(
'title' => t('Is less than'),
'method' => 'op_simple',
'method' => 'opSimple',
'short' => t('<'),
'values' => 1,
),
'<=' => array(
'title' => t('Is less than or equal to'),
'method' => 'op_simple',
'method' => 'opSimple',
'short' => t('<='),
'values' => 1,
),
'=' => array(
'title' => t('Is equal to'),
'method' => 'op_simple',
'method' => 'opSimple',
'short' => t('='),
'values' => 1,
),
'!=' => array(
'title' => t('Is not equal to'),
'method' => 'op_simple',
'method' => 'opSimple',
'short' => t('!='),
'values' => 1,
),
'>=' => array(
'title' => t('Is greater than or equal to'),
'method' => 'op_simple',
'method' => 'opSimple',
'short' => t('>='),
'values' => 1,
),
'>' => array(
'title' => t('Is greater than'),
'method' => 'op_simple',
'method' => 'opSimple',
'short' => t('>'),
'values' => 1,
),
......@@ -260,7 +260,7 @@ protected function opBetween($field) {
}
}
function op_simple($field) {
protected function opSimple($field) {
$this->query->add_where($this->options['group'], $field, $this->value['value'], $this->operator);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment