Commit b53df3c9 authored by alexpott's avatar alexpott

Issue #2001330 by juan.brein, KCarlile, zschmid, chertzog: Rename Views method...

Issue #2001330 by juan.brein, KCarlile, zschmid, chertzog: Rename Views method add_having_expression() to addHavingExpression().
parent 262895e9
......@@ -106,7 +106,7 @@ public function query($group_by = FALSE) {
$this->query->add_groupby("$search_index.sid");
$matches = $this->search_query->matches();
$placeholder = $this->placeholder();
$this->query->add_having_expression(0, "COUNT(*) >= $placeholder", array($placeholder => $matches));
$this->query->addHavingExpression(0, "COUNT(*) >= $placeholder", array($placeholder => $matches));
}
}
......
......@@ -186,7 +186,7 @@ public function query() {
$this->query->add_groupby("$search_index.sid");
$matches = $this->search_query->matches();
$placeholder = $this->placeholder();
$this->query->add_having_expression($this->options['group'], "COUNT(*) >= $placeholder", array($placeholder => $matches));
$this->query->addHavingExpression($this->options['group'], "COUNT(*) >= $placeholder", array($placeholder => $matches));
}
// Set to NULL to prevent PDO exception when views object is cached.
$this->search_query = NULL;
......
......@@ -23,7 +23,7 @@ public function query($group_by = FALSE) {
$field = $this->getField();
$placeholder = $this->placeholder();
$this->query->add_having_expression(0, "$field = $placeholder", array($placeholder => $this->argument));
$this->query->addHavingExpression(0, "$field = $placeholder", array($placeholder => $this->argument));
}
public function adminLabel($short = FALSE) {
......
......@@ -31,17 +31,17 @@ function op_between($field) {
$placeholder_min = $this->placeholder();
$placeholder_max = $this->placeholder();
if ($this->operator == 'between') {
$this->query->add_having_expression($this->options['group'], "$field >= $placeholder_min", array($placeholder_min => $this->value['min']));
$this->query->add_having_expression($this->options['group'], "$field <= $placeholder_max", array($placeholder_max => $this->value['max']));
$this->query->addHavingExpression($this->options['group'], "$field >= $placeholder_min", array($placeholder_min => $this->value['min']));
$this->query->addHavingExpression($this->options['group'], "$field <= $placeholder_max", array($placeholder_max => $this->value['max']));
}
else {
$this->query->add_having_expression($this->options['group'], "$field <= $placeholder_min OR $field >= $placeholder_max", array($placeholder_min => $this->value['min'], $placeholder_max => $this->value['max']));
$this->query->addHavingExpression($this->options['group'], "$field <= $placeholder_min OR $field >= $placeholder_max", array($placeholder_min => $this->value['min'], $placeholder_max => $this->value['max']));
}
}
function op_simple($field) {
$placeholder = $this->placeholder();
$this->query->add_having_expression($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']));
}
function op_empty($field) {
......@@ -52,7 +52,7 @@ function op_empty($field) {
$operator = "IS NOT NULL";
}
$this->query->add_having_expression($this->options['group'], "$field $operator");
$this->query->addHavingExpression($this->options['group'], "$field $operator");
}
public function adminLabel($short = FALSE) {
......
......@@ -953,7 +953,7 @@ function add_having($group, $field, $value = NULL, $operator = NULL) {
*
* @see QueryConditionInterface::having()
*/
function add_having_expression($group, $snippet, $args = array()) {
public function addHavingExpression($group, $snippet, $args = array()) {
// Ensure all variants of 0 are actually 0. Thus '', 0 and NULL are all
// the default group.
if (empty($group)) {
......
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