Commit 35a79260 authored by alexpott's avatar alexpott
Browse files

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) { ...@@ -178,7 +178,7 @@ protected function opBetween($field) {
$this->query->add_where_expression($this->options['group'], "$field $operator $a AND $b"); $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)); $value = intval(strtotime($this->value['value'], 0));
if (!empty($this->value['type']) && $this->value['type'] == 'offset') { if (!empty($this->value['type']) && $this->value['type'] == 'offset') {
$value = '***CURRENT_TIME***' . sprintf('%+d', $value); // keep sign $value = '***CURRENT_TIME***' . sprintf('%+d', $value); // keep sign
......
...@@ -39,7 +39,7 @@ protected function opBetween($field) { ...@@ -39,7 +39,7 @@ protected function opBetween($field) {
} }
} }
function op_simple($field) { protected function opSimple($field) {
$placeholder = $this->placeholder(); $placeholder = $this->placeholder();
$this->query->addHavingExpression($this->options['group'], "$field $this->operator $placeholder", array($placeholder => $this->value['value'])); $this->query->addHavingExpression($this->options['group'], "$field $this->operator $placeholder", array($placeholder => $this->value['value']));
} }
......
...@@ -109,14 +109,14 @@ function operators() { ...@@ -109,14 +109,14 @@ function operators() {
'title' => t('Is one of'), 'title' => t('Is one of'),
'short' => t('in'), 'short' => t('in'),
'short_single' => t('='), 'short_single' => t('='),
'method' => 'op_simple', 'method' => 'opSimple',
'values' => 1, 'values' => 1,
), ),
'not in' => array( 'not in' => array(
'title' => t('Is not one of'), 'title' => t('Is not one of'),
'short' => t('not in'), 'short' => t('not in'),
'short_single' => t('<>'), 'short_single' => t('<>'),
'method' => 'op_simple', 'method' => 'opSimple',
'values' => 1, 'values' => 1,
), ),
); );
...@@ -376,7 +376,7 @@ public function query() { ...@@ -376,7 +376,7 @@ public function query() {
} }
} }
function op_simple() { protected function opSimple() {
if (empty($this->value)) { if (empty($this->value)) {
return; return;
} }
......
...@@ -39,37 +39,37 @@ function operators() { ...@@ -39,37 +39,37 @@ function operators() {
$operators = array( $operators = array(
'<' => array( '<' => array(
'title' => t('Is less than'), 'title' => t('Is less than'),
'method' => 'op_simple', 'method' => 'opSimple',
'short' => t('<'), 'short' => t('<'),
'values' => 1, 'values' => 1,
), ),
'<=' => array( '<=' => array(
'title' => t('Is less than or equal to'), 'title' => t('Is less than or equal to'),
'method' => 'op_simple', 'method' => 'opSimple',
'short' => t('<='), 'short' => t('<='),
'values' => 1, 'values' => 1,
), ),
'=' => array( '=' => array(
'title' => t('Is equal to'), 'title' => t('Is equal to'),
'method' => 'op_simple', 'method' => 'opSimple',
'short' => t('='), 'short' => t('='),
'values' => 1, 'values' => 1,
), ),
'!=' => array( '!=' => array(
'title' => t('Is not equal to'), 'title' => t('Is not equal to'),
'method' => 'op_simple', 'method' => 'opSimple',
'short' => t('!='), 'short' => t('!='),
'values' => 1, 'values' => 1,
), ),
'>=' => array( '>=' => array(
'title' => t('Is greater than or equal to'), 'title' => t('Is greater than or equal to'),
'method' => 'op_simple', 'method' => 'opSimple',
'short' => t('>='), 'short' => t('>='),
'values' => 1, 'values' => 1,
), ),
'>' => array( '>' => array(
'title' => t('Is greater than'), 'title' => t('Is greater than'),
'method' => 'op_simple', 'method' => 'opSimple',
'short' => t('>'), 'short' => t('>'),
'values' => 1, 'values' => 1,
), ),
...@@ -260,7 +260,7 @@ protected function opBetween($field) { ...@@ -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); $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