Loading handlers/views_handler_argument_string.inc +13 −7 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ class views_handler_argument_string extends views_handler_argument { $options['path_case'] = array('default' => 'none'); $options['transform_dash'] = array('default' => FALSE, 'bool' => TRUE); $options['break_phrase'] = array('default' => FALSE, 'bool' => TRUE); $options['not'] = array('default' => FALSE, 'bool' => TRUE); if (!empty($this->definition['many to one'])) { $options['add_table'] = array('default' => FALSE, 'bool' => TRUE); Loading Loading @@ -132,6 +133,13 @@ class views_handler_argument_string extends views_handler_argument { '#default_value' => !empty($this->options['break_phrase']), '#fieldset' => 'more', ); $form['not'] = array( '#type' => 'checkbox', '#title' => t('Exclude'), '#description' => t('If selected, the numbers entered for the filter will be excluded rather than limiting the view.'), '#default_value' => !empty($this->options['not']), '#fieldset' => 'more', ); } /** Loading Loading @@ -207,21 +215,19 @@ class views_handler_argument_string extends views_handler_argument { } if (count($this->value) > 1) { $operator = 'IN'; $operator = empty($this->options['not']) ? 'IN' : 'NOT IN'; $argument = $this->value; } else { $operator = '='; $operator = empty($this->options['not']) ? '=' : '!='; } if ($formula) { $placeholder = $this->placeholder(); if ($operator == 'IN') { $field .= " IN($placeholder)"; } else { $field .= ' = ' . $placeholder; if (count($this->value) > 1) { $placeholder = "($placeholder)"; } $field .= " $operator $placeholder"; $placeholders = array( $placeholder => $argument, ); Loading Loading
handlers/views_handler_argument_string.inc +13 −7 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ class views_handler_argument_string extends views_handler_argument { $options['path_case'] = array('default' => 'none'); $options['transform_dash'] = array('default' => FALSE, 'bool' => TRUE); $options['break_phrase'] = array('default' => FALSE, 'bool' => TRUE); $options['not'] = array('default' => FALSE, 'bool' => TRUE); if (!empty($this->definition['many to one'])) { $options['add_table'] = array('default' => FALSE, 'bool' => TRUE); Loading Loading @@ -132,6 +133,13 @@ class views_handler_argument_string extends views_handler_argument { '#default_value' => !empty($this->options['break_phrase']), '#fieldset' => 'more', ); $form['not'] = array( '#type' => 'checkbox', '#title' => t('Exclude'), '#description' => t('If selected, the numbers entered for the filter will be excluded rather than limiting the view.'), '#default_value' => !empty($this->options['not']), '#fieldset' => 'more', ); } /** Loading Loading @@ -207,21 +215,19 @@ class views_handler_argument_string extends views_handler_argument { } if (count($this->value) > 1) { $operator = 'IN'; $operator = empty($this->options['not']) ? 'IN' : 'NOT IN'; $argument = $this->value; } else { $operator = '='; $operator = empty($this->options['not']) ? '=' : '!='; } if ($formula) { $placeholder = $this->placeholder(); if ($operator == 'IN') { $field .= " IN($placeholder)"; } else { $field .= ' = ' . $placeholder; if (count($this->value) > 1) { $placeholder = "($placeholder)"; } $field .= " $operator $placeholder"; $placeholders = array( $placeholder => $argument, ); Loading