Commit d2c9b80d authored by dawehner's avatar dawehner Committed by tim.plunkett
Browse files

Issue #1720734 by dawehner, damiankloip: Allow many to one handler to work with strings.

parent 14a8b0df
...@@ -63,15 +63,13 @@ function options_form(&$form, &$form_state) { ...@@ -63,15 +63,13 @@ function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state); parent::options_form($form, $form_state);
// allow + for or, , for and // allow + for or, , for and
if (!empty($this->definition['numeric'])) { $form['break_phrase'] = array(
$form['break_phrase'] = array( '#type' => 'checkbox',
'#type' => 'checkbox', '#title' => t('Allow multiple values'),
'#title' => t('Allow multiple values'), '#description' => t('If selected, users can enter multiple values in the form of 1+2+3 (for OR) or 1,2,3 (for AND).'),
'#description' => t('If selected, users can enter multiple values in the form of 1+2+3 (for OR) or 1,2,3 (for AND).'), '#default_value' => !empty($this->options['break_phrase']),
'#default_value' => !empty($this->options['break_phrase']), '#fieldset' => 'more',
'#fieldset' => 'more', );
);
}
$form['add_table'] = array( $form['add_table'] = array(
'#type' => 'checkbox', '#type' => 'checkbox',
...@@ -118,7 +116,12 @@ function query($group_by = FALSE) { ...@@ -118,7 +116,12 @@ function query($group_by = FALSE) {
} }
if (!empty($this->options['break_phrase'])) { if (!empty($this->options['break_phrase'])) {
views_break_phrase($this->argument, $this); if (!empty($this->definition['nummeric'])) {
views_break_phrase($this->argument, $this);
}
else {
views_break_phrase_string($this->argument, $this);
}
} }
else { else {
$this->value = array($this->argument); $this->value = array($this->argument);
......
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